1 |
|
2 | buildscript {
|
3 | repositories {
|
4 | google()
|
5 | jcenter()
|
6 | }
|
7 |
|
8 | dependencies {
|
9 | classpath 'com.android.tools.build:gradle:3.1.3'
|
10 | }
|
11 | }
|
12 |
|
13 | apply plugin: 'com.android.library'
|
14 | apply plugin: 'maven'
|
15 |
|
16 | group = 'host.exp.exponent'
|
17 | version = '6.0.0'
|
18 |
|
19 | def safeExtGet(prop, fallback) {
|
20 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
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", 28)
|
50 |
|
51 | defaultConfig {
|
52 | minSdkVersion safeExtGet("minSdkVersion", 21)
|
53 | targetSdkVersion safeExtGet("targetSdkVersion", 28)
|
54 | versionCode 13
|
55 | versionName "6.0.0"
|
56 | }
|
57 | lintOptions {
|
58 | abortOnError false
|
59 | }
|
60 | }
|
61 |
|
62 | if (new File(rootProject.projectDir.parentFile, 'package.json').exists()) {
|
63 | apply from: project(":unimodules-core").file("../unimodules-core.gradle")
|
64 | } else {
|
65 | throw new GradleException(
|
66 | "'unimodules-core.gradle' was not found in the usual Flutter or React Native dependency locations. " +
|
67 | "This package can only be used in such projects. Are you sure you've installed the dependencies properly?")
|
68 | }
|
69 |
|
70 | dependencies {
|
71 | unimodule "unimodules-core"
|
72 | unimodule "unimodules-task-manager-interface"
|
73 | unimodule "unimodules-constants-interface"
|
74 | unimodule "expo-app-loader-provider"
|
75 |
|
76 | api "com.android.support:support-compat:${safeExtGet("supportLibVersion", "28.0.0")}"
|
77 | }
|