XuqmGroup-AndroidSDK/sdk-log/build.gradle.kts

53 行
1.4 KiB
Plaintext

plugins {
id("com.android.library")
id("maven-publish")
}
group = rootProject.group
android {
namespace = "com.xuqm.sdk.log"
compileSdk = 36
defaultConfig { minSdk = 24 }
publishing { singleVariant("release") { withSourcesJar() } }
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
val sdkLogVersion: String by lazy {
(project.findProperty("SDK_LOG_VERSION") as? String)?.takeIf { it.isNotBlank() }
?: (project.findProperty("PUBLISH_VERSION") as? String)?.takeIf { it.isNotBlank() }
?: "0.0.1-SNAPSHOT"
}
afterEvaluate {
publishing {
publications {
create<MavenPublication>("release") {
from(components["release"])
groupId = "com.xuqm"
artifactId = "sdk-log"
version = sdkLogVersion
}
}
repositories {
maven {
url = uri(rootProject.ext["nexusUrl"] as String)
credentials {
username = project.findProperty("NEXUS_USER") as? String ?: ""
password = project.findProperty("NEXUS_PASSWORD") as? String ?: ""
}
}
}
}
}
dependencies {
implementation(project(":sdk-core"))
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.google.code.gson:gson:2.10.1")
}