UNPKG

1.8 kBPlain TextView Raw
1apply plugin: 'com.android.library'
2apply plugin: 'kotlin-android'
3apply plugin: 'maven'
4
5group = 'host.exp.exponent'
6version = '3.0.2'
7
8buildscript {
9 // Simple helper that allows the root project to override versions declared by this library.
10 ext.safeExtGet = { prop, fallback ->
11 rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
12 }
13
14 repositories {
15 mavenCentral()
16 }
17
18 dependencies {
19 classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
20 }
21}
22
23// Upload android library to maven with javadoc and android sources
24configurations {
25 deployerJars
26}
27
28// Creating sources with comments
29task androidSourcesJar(type: Jar) {
30 classifier = 'sources'
31 from android.sourceSets.main.java.srcDirs
32}
33
34// Put the androidSources and javadoc to the artifacts
35artifacts {
36 archives androidSourcesJar
37}
38
39uploadArchives {
40 repositories {
41 mavenDeployer {
42 configuration = configurations.deployerJars
43 repository(url: mavenLocal().url)
44 }
45 }
46}
47
48android {
49 compileSdkVersion safeExtGet("compileSdkVersion", 30)
50
51 compileOptions {
52 sourceCompatibility JavaVersion.VERSION_1_8
53 targetCompatibility JavaVersion.VERSION_1_8
54 }
55
56 defaultConfig {
57 minSdkVersion safeExtGet("minSdkVersion", 21)
58 targetSdkVersion safeExtGet("targetSdkVersion", 30)
59 versionCode 9
60 versionName '3.0.2'
61 }
62 lintOptions {
63 abortOnError false
64 }
65}
66
67dependencies {
68 implementation project(':expo-modules-core')
69 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
70
71 if (project.findProject(':unimodules-test-core')) {
72 testImplementation project(':unimodules-test-core')
73 }
74 testImplementation 'junit:junit:4.12'
75 testImplementation "org.robolectric:robolectric:4.3.1"
76}