1 | apply plugin: 'com.android.library'
|
2 | apply plugin: 'maven'
|
3 |
|
4 | group = 'host.exp.exponent'
|
5 | version = '9.0.0'
|
6 |
|
7 |
|
8 | def safeExtGet(prop, fallback) {
|
9 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
10 | }
|
11 |
|
12 |
|
13 | configurations {
|
14 | deployerJars
|
15 | }
|
16 |
|
17 |
|
18 | task androidSourcesJar(type: Jar) {
|
19 | classifier = 'sources'
|
20 | from android.sourceSets.main.java.srcDirs
|
21 | }
|
22 |
|
23 |
|
24 | artifacts {
|
25 | archives androidSourcesJar
|
26 | }
|
27 |
|
28 | uploadArchives {
|
29 | repositories {
|
30 | mavenDeployer {
|
31 | configuration = configurations.deployerJars
|
32 | repository(url: mavenLocal().url)
|
33 | }
|
34 | }
|
35 | }
|
36 |
|
37 | android {
|
38 | compileSdkVersion safeExtGet("compileSdkVersion", 29)
|
39 |
|
40 | defaultConfig {
|
41 | minSdkVersion safeExtGet("minSdkVersion", 21)
|
42 | targetSdkVersion safeExtGet("targetSdkVersion", 29)
|
43 | versionCode 16
|
44 | versionName '9.0.0'
|
45 | }
|
46 | lintOptions {
|
47 | abortOnError false
|
48 | }
|
49 | }
|
50 |
|
51 | if (new File(rootProject.projectDir.parentFile, 'package.json').exists()) {
|
52 | apply from: project(':unimodules-core').file('../unimodules-core.gradle')
|
53 | } else {
|
54 | throw new GradleException(
|
55 | '\'unimodules-core.gradle\' was not found in the usual React Native dependency location. ' +
|
56 | 'This package can only be used in such projects. Are you sure you\'ve installed the dependencies properly?')
|
57 | }
|
58 |
|
59 | dependencies {
|
60 | unimodule 'unimodules-core'
|
61 | api 'com.amplitude:android-sdk:2.23.2'
|
62 | }
|