• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import org.robolectric.gradle.DeployedRoboJavaModulePlugin
2import org.robolectric.gradle.RoboJavaModulePlugin
3
4apply plugin: RoboJavaModulePlugin
5apply plugin: DeployedRoboJavaModulePlugin
6
7if (System.getenv('PUBLISH_NATIVERUNTIME_DIST_COMPAT') == "true") {
8  apply plugin: 'maven-publish'
9  apply plugin: "signing"
10
11  publishing {
12    publications {
13      nativeRuntimeDist(MavenPublication) {
14        artifact System.env["NATIVERUNTIME_DIST_COMPAT_JAR"]
15        artifactId 'nativeruntime-dist-compat'
16        version System.env["NATIVERUNTIME_DIST_COMPAT_VERSION"]
17
18        pom {
19          name = "Robolectric Nativeruntime Distribution Compat"
20          description = "Robolectric Nativeruntime Distribution Compat"
21          url = "https://source.android.com/"
22          inceptionYear = "2008"
23          licenses {
24            license {
25              name = "Apache 2.0"
26              url = "http://www.apache.org/licenses/LICENSE-2.0"
27              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."
28              distribution = "repo"
29            }
30          }
31
32          scm {
33            url = "https://android.googlesource.com/platform/manifest.git"
34            connection = "https://android.googlesource.com/platform/manifest.git"
35          }
36
37          developers {
38            developer {
39              name = "The Android Open Source Projects"
40            }
41          }
42        }
43      }
44    }
45    repositories {
46      maven {
47        url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
48
49        credentials {
50          username = System.properties["sonatype-login"] ?: System.env['SONATYPE_LOGIN']
51          password = System.properties["sonatype-password"] ?: System.env['SONATYPE_PASSWORD']
52        }
53      }
54    }
55  }
56
57  signing {
58    sign publishing.publications.nativeRuntimeDist
59  }
60}
61
62dependencies {
63  api project(":utils")
64  api project(":utils:reflector")
65  api libs.guava
66
67  implementation libs.robolectric.nativeruntime.dist.compat
68
69  annotationProcessor libs.auto.service
70  compileOnly libs.auto.service.annotations
71  compileOnly AndroidSdk.MAX_SDK.coordinates
72
73  testCompileOnly AndroidSdk.MAX_SDK.coordinates
74  testRuntimeOnly AndroidSdk.MAX_SDK.coordinates
75  testImplementation project(":robolectric")
76  testImplementation libs.junit4
77  testImplementation libs.truth
78}
79