1 | apply plugin: 'com.android.library'
|
2 | apply plugin: 'maven'
|
3 | apply plugin: 'kotlin-android'
|
4 |
|
5 | group = 'host.exp.exponent'
|
6 | version = '8.6.0'
|
7 |
|
8 |
|
9 | buildscript {
|
10 |
|
11 | ext.safeExtGet = { prop, fallback ->
|
12 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
13 | }
|
14 |
|
15 | repositories {
|
16 | mavenCentral()
|
17 | }
|
18 |
|
19 | dependencies {
|
20 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet("kotlinVersion", "1.3.50")}")
|
21 | }
|
22 | }
|
23 |
|
24 |
|
25 | configurations {
|
26 | deployerJars
|
27 | }
|
28 |
|
29 |
|
30 | task androidSourcesJar(type: Jar) {
|
31 | classifier = 'sources'
|
32 | from android.sourceSets.main.java.srcDirs
|
33 | }
|
34 |
|
35 |
|
36 | artifacts {
|
37 | archives androidSourcesJar
|
38 | }
|
39 |
|
40 | uploadArchives {
|
41 | repositories {
|
42 | mavenDeployer {
|
43 | configuration = configurations.deployerJars
|
44 | repository(url: mavenLocal().url)
|
45 | }
|
46 | }
|
47 | }
|
48 |
|
49 | android {
|
50 | compileSdkVersion safeExtGet("compileSdkVersion", 29)
|
51 |
|
52 | defaultConfig {
|
53 | minSdkVersion safeExtGet("minSdkVersion", 21)
|
54 | targetSdkVersion safeExtGet("targetSdkVersion", 29)
|
55 | versionCode 17
|
56 | versionName '8.6.0'
|
57 | }
|
58 | lintOptions {
|
59 | abortOnError false
|
60 | }
|
61 | compileOptions {
|
62 | sourceCompatibility = '1.8'
|
63 | targetCompatibility = '1.8'
|
64 | }
|
65 | }
|
66 |
|
67 | if (new File(rootProject.projectDir.parentFile, 'package.json').exists()) {
|
68 | apply from: project(':unimodules-core').file('../unimodules-core.gradle')
|
69 | } else {
|
70 | throw new GradleException(
|
71 | '\'unimodules-core.gradle\' was not found in the usual React Native dependency location. ' +
|
72 | 'This package can only be used in such projects. Are you sure you\'ve installed the dependencies properly?')
|
73 | }
|
74 |
|
75 | dependencies {
|
76 | unimodule 'unimodules-core'
|
77 |
|
78 | testImplementation "org.robolectric:robolectric:4.3.1"
|
79 |
|
80 | api "androidx.browser:browser:1.2.0"
|
81 | }
|