| import groovy.json.JsonSlurper |
| import java.nio.charset.StandardCharsets |
| import org.robolectric.gradle.DeployedRoboJavaModulePlugin |
| import org.robolectric.gradle.RoboJavaModulePlugin |
| |
| apply plugin: RoboJavaModulePlugin |
| apply plugin: DeployedRoboJavaModulePlugin |
| |
| if (System.getenv('PUBLISH_NATIVERUNTIME_DIST_COMPAT') == "true") { |
| apply plugin: 'maven-publish' |
| apply plugin: "signing" |
| |
| publishing { |
| publications { |
| nativeRuntimeDist(MavenPublication) { |
| artifact System.env["NATIVERUNTIME_DIST_COMPAT_JAR"] |
| artifactId 'nativeruntime-dist-compat' |
| version System.env["NATIVERUNTIME_DIST_COMPAT_VERSION"] |
| |
| pom { |
| name = "Robolectric Nativeruntime Distribution Compat" |
| description = "Robolectric Nativeruntime Distribution Compat" |
| url = "https://source.android.com/" |
| inceptionYear = "2008" |
| licenses { |
| license { |
| name = "Apache 2.0" |
| url = "http://www.apache.org/licenses/LICENSE-2.0" |
| comments = "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." |
| distribution = "repo" |
| } |
| } |
| |
| scm { |
| url = "https://android.googlesource.com/platform/manifest.git" |
| connection = "https://android.googlesource.com/platform/manifest.git" |
| } |
| |
| developers { |
| developer { |
| name = "The Android Open Source Projects" |
| } |
| } |
| } |
| } |
| } |
| repositories { |
| maven { |
| url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" |
| |
| credentials { |
| username = System.properties["sonatype-login"] ?: System.env['sonatypeLogin'] |
| password = System.properties["sonatype-password"] ?: System.env['sonatypePassword'] |
| } |
| } |
| } |
| } |
| |
| signing { |
| sign publishing.publications.nativeRuntimeDist |
| } |
| } |
| |
| dependencies { |
| api project(":utils") |
| api project(":utils:reflector") |
| api "com.google.guava:guava:$guavaJREVersion" |
| |
| implementation "org.robolectric:nativeruntime-dist-compat:1.0.0" |
| |
| annotationProcessor "com.google.auto.service:auto-service:$autoServiceVersion" |
| compileOnly "com.google.auto.service:auto-service-annotations:$autoServiceVersion" |
| compileOnly AndroidSdk.MAX_SDK.coordinates |
| |
| testCompileOnly AndroidSdk.MAX_SDK.coordinates |
| testRuntimeOnly AndroidSdk.MAX_SDK.coordinates |
| testImplementation project(":robolectric") |
| testImplementation "junit:junit:${junitVersion}" |
| testImplementation "com.google.truth:truth:${truthVersion}" |
| } |