1 | apply plugin: 'com.android.library'
|
2 | apply plugin: 'maven'
|
3 |
|
4 | group = 'host.exp.exponent'
|
5 | version = '0.3.1'
|
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", 28)
|
39 |
|
40 | defaultConfig {
|
41 | minSdkVersion safeExtGet("minSdkVersion", 21)
|
42 | targetSdkVersion safeExtGet("targetSdkVersion", 29)
|
43 | versionCode 23
|
44 | versionName '0.3.1'
|
45 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
46 | }
|
47 | lintOptions {
|
48 | abortOnError false
|
49 | }
|
50 | compileOptions {
|
51 | sourceCompatibility = '1.8'
|
52 | targetCompatibility = '1.8'
|
53 | }
|
54 | testOptions {
|
55 | unitTests.includeAndroidResources = true
|
56 | }
|
57 | }
|
58 |
|
59 | if (new File(rootProject.projectDir.parentFile, 'package.json').exists()) {
|
60 | apply from: project(":unimodules-core").file("../unimodules-core.gradle")
|
61 | } else {
|
62 | throw new GradleException(
|
63 | '\'unimodules-core.gradle\' was not found in the usual React Native dependency location. ' +
|
64 | 'This package can only be used in such projects. Are you sure you\'ve installed the dependencies properly?')
|
65 | }
|
66 |
|
67 | dependencies {
|
68 | unimodule 'unimodules-core'
|
69 | implementation "com.facebook.react:react-native:+"
|
70 |
|
71 | def room_version = "2.1.0"
|
72 |
|
73 | implementation "androidx.room:room-runtime:$room_version"
|
74 | annotationProcessor "androidx.room:room-compiler:$room_version"
|
75 |
|
76 | implementation("com.squareup.okhttp3:okhttp:3.12.1")
|
77 | implementation("com.squareup.okhttp3:okhttp-urlconnection:3.12.1")
|
78 | implementation("com.squareup.okio:okio:1.15.0")
|
79 | implementation("commons-io:commons-io:2.6")
|
80 | implementation("org.apache.commons:commons-lang3:3.9")
|
81 |
|
82 | testImplementation 'junit:junit:4.12'
|
83 | testImplementation 'androidx.test:core:1.0.0'
|
84 | testImplementation 'org.mockito:mockito-core:1.10.19'
|
85 |
|
86 | androidTestImplementation 'androidx.test:runner:1.1.0'
|
87 | androidTestImplementation 'androidx.test:rules:1.1.0'
|
88 | }
|