1 | apply plugin: 'com.android.library'
|
2 | apply plugin: 'kotlin-android'
|
3 | apply plugin: 'maven'
|
4 |
|
5 | group = 'host.exp.exponent'
|
6 | version = '10.2.0'
|
7 |
|
8 | buildscript {
|
9 |
|
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 |
|
24 | configurations {
|
25 | deployerJars
|
26 | }
|
27 |
|
28 |
|
29 | task androidSourcesJar(type: Jar) {
|
30 | classifier = 'sources'
|
31 | from android.sourceSets.main.java.srcDirs
|
32 | }
|
33 |
|
34 |
|
35 | artifacts {
|
36 | archives androidSourcesJar
|
37 | }
|
38 |
|
39 | uploadArchives {
|
40 | repositories {
|
41 | mavenDeployer {
|
42 | configuration = configurations.deployerJars
|
43 | repository(url: mavenLocal().url)
|
44 | }
|
45 | }
|
46 | }
|
47 |
|
48 | android {
|
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 17
|
60 | versionName "10.2.0"
|
61 | }
|
62 | lintOptions {
|
63 | abortOnError false
|
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 | api "androidx.appcompat:appcompat:1.2.0"
|
79 |
|
80 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
|
81 | }
|