mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
* build(sdk-android): bump AGP 8.11.0 → 8.13.0 Required by com.vanniktech.maven.publish 0.36.0, bumped in the following commit to pull a Dokka 2.x that handles JDK 21+ version strings. * build(sdk-android): migrate to vanniktech 0.36 + Dokka v2 javadoc Fixes the `javaDocReleaseGeneration` crash on JDK 21+ hosts (IllegalArgumentException: 25.0.2 in the bundled IntelliJ JavaVersion.parse). Root cause: AGP's JavaDocGenerationTask pulled an old Dokka whose vendored util-lang predated JDK 9+ version strings. Fixed upstream in Dokka 2.1.0 (Kotlin/dokka#4202). Changes in this commit: - Bump vanniktech-maven-publish 0.30.0 → 0.36.0, which drops Dokka v1 support and the SonatypeHost parameter (Central Portal is now the default). - Apply org.jetbrains.dokka and org.jetbrains.dokka-javadoc 2.2.0 so the javadoc jar is generated by Dokka 2.x directly, not AGP's bundled-Dokka path. - Switch AndroidSingleVariantLibrary to the explicit JavadocJar.Dokka("dokkaGeneratePublicationJavadoc") form; the old `publishJavadocJar = true` boolean now maps to plain javadoc, which still goes through AGP's broken path on Android source sets. - Enable V2Enabled in gradle.properties (required by 0.36+) and silence the transitional opt-in warning. Verified: `make release-android-local` on openjdk 25.0.2 produces aar, sources jar, javadoc jar, pom, and module; `./gradlew :sdk-android:testDebugUnitTest :sidecar:test` still pass.
99 lines
2.8 KiB
Kotlin
99 lines
2.8 KiB
Kotlin
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
|
|
import com.vanniktech.maven.publish.JavadocJar
|
|
import com.vanniktech.maven.publish.SourcesJar
|
|
|
|
plugins {
|
|
id("com.android.library") version "8.13.0"
|
|
kotlin("android") version "2.1.21"
|
|
id("com.vanniktech.maven.publish") version "0.36.0"
|
|
id("org.jetbrains.dokka") version "2.2.0"
|
|
id("org.jetbrains.dokka-javadoc") version "2.2.0"
|
|
}
|
|
|
|
version = findProperty("uatu.version") as String? ?: "0.0.0-dev"
|
|
group = "io.github.priyanshujain"
|
|
|
|
android {
|
|
namespace = "dev.uatu.sdk"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
minSdk = 24
|
|
consumerProguardFiles("consumer-rules.pro")
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
|
|
testOptions {
|
|
unitTests.isReturnDefaultValues = true
|
|
}
|
|
}
|
|
|
|
mavenPublishing {
|
|
publishToMavenCentral(automaticRelease = true)
|
|
|
|
// Sign only when a release-signing key is provided (env or Gradle
|
|
// property). Unsigned runs are useful for `publishToMavenLocal` dry-runs;
|
|
// CI always has the key set so the actual Central push is always signed.
|
|
if (findProperty("signingInMemoryKey") != null) {
|
|
signAllPublications()
|
|
}
|
|
|
|
configure(
|
|
AndroidSingleVariantLibrary(
|
|
javadocJar = JavadocJar.Dokka("dokkaGeneratePublicationJavadoc"),
|
|
sourcesJar = SourcesJar.Sources(),
|
|
variant = "release",
|
|
),
|
|
)
|
|
|
|
coordinates(
|
|
groupId = "io.github.priyanshujain",
|
|
artifactId = "sdk-android",
|
|
version = version.toString(),
|
|
)
|
|
|
|
pom {
|
|
name.set("uatu sdk-android")
|
|
description.set(
|
|
"Android runtime SDK for uatu, a property-based UI fuzzer for mobile apps. " +
|
|
"Exposes a content-provider accessibility bridge consumed by the uatu CLI at test time.",
|
|
)
|
|
url.set("https://github.com/priyanshujain/uatu")
|
|
|
|
licenses {
|
|
license {
|
|
name.set("Apache License, Version 2.0")
|
|
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
|
|
distribution.set("repo")
|
|
}
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
id.set("priyanshujain")
|
|
name.set("Priyanshu Jain")
|
|
url.set("https://github.com/priyanshujain")
|
|
}
|
|
}
|
|
|
|
scm {
|
|
url.set("https://github.com/priyanshujain/uatu")
|
|
connection.set("scm:git:git://github.com/priyanshujain/uatu.git")
|
|
developerConnection.set("scm:git:ssh://[email protected]/priyanshujain/uatu.git")
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation("junit:junit:4.13.2")
|
|
testImplementation("org.json:json:20240303")
|
|
}
|