1 import java.net.URI 2 <lambda>null3plugins { 4 alias(libs.plugins.robolectric.deployed.java.module) 5 alias(libs.plugins.robolectric.java.module) 6 } 7 8 if (System.getenv("PUBLISH_NATIVERUNTIME_DIST_COMPAT") == "true") { 9 pluginManager.apply("maven-publish") 10 pluginManager.apply("signing") 11 <lambda>null12 publishing { 13 publications { 14 register<MavenPublication>("nativeRuntimeDist") { 15 val nativeRuntimeDistCompatJar = System.getenv("NATIVERUNTIME_DIST_COMPAT_JAR") 16 val nativeRuntimeDistCompatVersion = System.getenv("NATIVERUNTIME_DIST_COMPAT_VERSION") 17 18 artifact(nativeRuntimeDistCompatJar) 19 artifactId = "nativeruntime-dist-compat" 20 version = nativeRuntimeDistCompatVersion 21 22 pom { 23 name = "Robolectric Nativeruntime Distribution Compat" 24 description = "Robolectric Nativeruntime Distribution Compat" 25 url = "https://source.android.com/" 26 inceptionYear = "2008" 27 28 licenses { 29 license { 30 name = "Apache 2.0" 31 url = "http://www.apache.org/licenses/LICENSE-2.0" 32 comments = 33 "While the EULA for the Android SDK restricts distribution of those binaries, the source code is licensed under Apache 2.0 which allows compiling binaries from source and then distributing those versions." 34 distribution = "repo" 35 } 36 } 37 38 scm { 39 url = "https://android.googlesource.com/platform/manifest.git" 40 connection = "https://android.googlesource.com/platform/manifest.git" 41 } 42 43 developers { developer { name = "The Android Open Source Projects" } } 44 } 45 } 46 } 47 48 repositories { 49 maven { 50 url = URI("https://oss.sonatype.org/service/local/staging/deploy/maven2/") 51 52 credentials { 53 username = System.getProperty("sonatype-login") ?: System.getenv("SONATYPE_LOGIN") 54 password = System.getProperty("sonatype-password") ?: System.getenv("SONATYPE_PASSWORD") 55 } 56 } 57 } 58 59 signing { sign(publications.getByName("nativeRuntimeDist")) } 60 } 61 } 62 <lambda>null63dependencies { 64 api(project(":shadowapi")) 65 api(project(":utils")) 66 api(project(":utils:reflector")) 67 api(libs.guava) 68 69 implementation(libs.robolectric.nativeruntime.dist.compat) 70 71 annotationProcessor(libs.auto.service) 72 compileOnly(libs.auto.service.annotations) 73 compileOnly(AndroidSdk.MAX_SDK.coordinates) 74 75 testCompileOnly(AndroidSdk.MAX_SDK.coordinates) 76 testRuntimeOnly(AndroidSdk.MAX_SDK.coordinates) 77 testImplementation(project(":robolectric")) 78 testImplementation(libs.junit4) 79 testImplementation(libs.truth) 80 } 81