@@ -6,8 +6,8 @@ plugins {
66
77android {
88 namespace = " io.github.libxposed.api"
9- compileSdk = 36
10- buildToolsVersion = " 36.1 .0"
9+ compileSdk = 37
10+ buildToolsVersion = " 37.0 .0"
1111 androidResources.enable = false
1212 enableKotlin = false
1313
@@ -32,14 +32,21 @@ android {
3232 }
3333}
3434
35+ val libVersion = " 102.0.0"
36+ val publishSnapshot = providers.gradleProperty(" publishSnapshot" ).orNull == " true"
37+ val dependencySnapshot = providers.gradleProperty(" dependencySnapshot" ).orNull == " true"
38+ fun String.real (snapshot : Boolean ) = if (snapshot) " $this -SNAPSHOT" else this
39+ val libxposedAnnotation = " io.github.libxposed:annotation:" + libs.versions.libxposed.annotation.get()
40+ val libxposedLint = " io.github.libxposed:lint:" + libs.versions.libxposed.lint.get()
41+
3542dependencies {
3643 compileOnly(libs.androidx.annotation)
37- compileOnly(libs.libxposed.annotation )
38- lintPublish(libs.libxposed.lint )
44+ compileOnly(libxposedAnnotation.real(dependencySnapshot) )
45+ lintPublish(libxposedLint.real(dependencySnapshot) )
3946}
4047
4148val androidJavadoc by tasks.registering(Javadoc ::class ) {
42- title = " libxposed API $version "
49+ title = " libxposed API $libVersion "
4350 source(layout.projectDirectory.dir(" src/main/java" ))
4451 destinationDir = layout.buildDirectory.dir(" javadoc" ).get().asFile
4552
@@ -73,7 +80,7 @@ publishing {
7380 register<MavenPublication >(" api" ) {
7481 artifactId = " api"
7582 group = " io.github.libxposed"
76- version = " 102.0.0 "
83+ version = libVersion.real(publishSnapshot)
7784 artifact(javadocJar)
7885 pom {
7986 name.set(" api" )
@@ -107,6 +114,11 @@ publishing {
107114 url = uri(" https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/" )
108115 credentials(PasswordCredentials ::class )
109116 }
117+ maven {
118+ name = " snapshots"
119+ url = uri(" https://central.sonatype.com/repository/maven-snapshots/" )
120+ credentials(PasswordCredentials ::class )
121+ }
110122 maven {
111123 name = " GitHubPackages"
112124 url = uri(" https://maven.pkg.github.com/libxposed/api" )
0 commit comments