XuqmGroup-AndroidSDK/sdk-common-plugin/build.gradle.kts

54 行
1.4 KiB
Plaintext

plugins {
kotlin("jvm") version "2.3.10"
`java-gradle-plugin`
`maven-publish`
}
group = "com.xuqm"
val pluginVersion: String by lazy {
(project.findProperty("SDK_CORE_VERSION") as? String)?.takeIf { it.isNotBlank() }
?: (project.findProperty("PUBLISH_VERSION") as? String)?.takeIf { it.isNotBlank() }
?: "0.1.0-SNAPSHOT"
}
version = pluginVersion
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
kotlin {
jvmToolchain(21)
}
gradlePlugin {
plugins {
create("common") {
id = "com.xuqm.common"
implementationClass = "com.xuqm.sdk.common.gradle.XuqmCommonPlugin"
displayName = "XuqmGroup Common Plugin"
description = "Validates the signed Xuqm config and injects immutable build identity."
}
}
}
dependencies {
compileOnly("com.android.tools.build:gradle:9.1.0")
implementation("com.google.code.gson:gson:2.13.2")
testImplementation("junit:junit:4.13.2")
}
publishing {
repositories {
maven {
url = uri("https://nexus.xuqinmin.com/repository/android-hosted/")
credentials {
username = project.findProperty("NEXUS_USER") as? String ?: ""
password = project.findProperty("NEXUS_PASSWORD") as? String ?: ""
}
}
}
}