Files
sanderling/sdk/android/build.gradle.kts
pj 75780db3fa refactor(sdk-android): publish under io.github.priyanshujain.sanderling + ci docs fix (#27)
* refactor(sdk-android): publish under io.github.priyanshujain.sanderling

Move the published Maven coordinates to a sanderling sub-namespace so the
brand is visible in the dependency line (was io.github.priyanshujain:sdk-android).
Sub-namespace is auto-allowed by Sonatype under the verified parent groupId.

* chore: update sdk-android coordinates in folio + docs

Follow the groupId change to io.github.priyanshujain.sanderling:sdk-android.

* ci(docs): use --version flag for d2 install script

The d2 installer accepts --version vX.Y.Z, not --tag. The --tag form
was rejected as "unrecognized flag" on the docs workflow run after
PR #26 merged.
2026-04-21 15:17:56 +07:00

99 lines
2.9 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("sanderling.version") as String? ?: "0.0.0-dev"
group = "io.github.priyanshujain.sanderling"
android {
namespace = "dev.sanderling.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.sanderling",
artifactId = "sdk-android",
version = version.toString(),
)
pom {
name.set("sanderling sdk-android")
description.set(
"Android runtime SDK for sanderling, a property-based UI fuzzer for mobile apps. " +
"Exposes a content-provider accessibility bridge consumed by the sanderling CLI at test time.",
)
url.set("https://github.com/priyanshujain/sanderling")
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/sanderling")
connection.set("scm:git:git://github.com/priyanshujain/sanderling.git")
developerConnection.set("scm:git:ssh://[email protected]/priyanshujain/sanderling.git")
}
}
}
dependencies {
testImplementation("junit:junit:4.13.2")
testImplementation("org.json:json:20240303")
}