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