UNPKG

1.83 kBPlain TextView Raw
1
2buildscript {
3 repositories {
4 google()
5 jcenter()
6 }
7
8 dependencies {
9 classpath 'com.android.tools.build:gradle:3.1.3'
10 }
11}
12
13apply plugin: 'com.android.library'
14apply plugin: 'maven'
15
16group = 'host.exp.exponent'
17version = '6.0.0'
18
19def safeExtGet(prop, fallback) {
20 rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
21}
22
23// Upload android library to maven with javadoc and android sources
24configurations {
25 deployerJars
26}
27
28// Creating sources with comments
29task androidSourcesJar(type: Jar) {
30 classifier = 'sources'
31 from android.sourceSets.main.java.srcDirs
32}
33
34// Put the androidSources and javadoc to the artifacts
35artifacts {
36 archives androidSourcesJar
37}
38
39uploadArchives {
40 repositories {
41 mavenDeployer {
42 configuration = configurations.deployerJars
43 repository(url: mavenLocal().url)
44 }
45 }
46}
47
48android {
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
62if (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
70dependencies {
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}