UNPKG

1.6 kBPlain TextView Raw
1buildscript {
2 repositories {
3 google()
4 jcenter()
5 }
6
7 dependencies {
8 classpath 'com.android.tools.build:gradle:3.2.1'
9 }
10}
11
12apply plugin: 'com.android.library'
13apply plugin: 'maven'
14
15group = 'host.exp.exponent'
16version = '5.0.0'
17
18def safeExtGet(prop, fallback) {
19 rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
20}
21
22// Upload android library to maven with javadoc and android sources
23configurations {
24 deployerJars
25}
26
27// Creating sources with comments
28task androidSourcesJar(type: Jar) {
29 classifier = 'sources'
30 from android.sourceSets.main.java.srcDirs
31}
32
33// Put the androidSources and javadoc to the artifacts
34artifacts {
35 archives androidSourcesJar
36}
37
38uploadArchives {
39 repositories {
40 mavenDeployer {
41 configuration = configurations.deployerJars
42 repository(url: mavenLocal().url)
43 }
44 }
45}
46
47android {
48 compileSdkVersion safeExtGet("compileSdkVersion", 28)
49
50 defaultConfig {
51 minSdkVersion safeExtGet("minSdkVersion", 21)
52 targetSdkVersion safeExtGet("targetSdkVersion", 28)
53 versionCode 14
54 versionName "5.0.0"
55 }
56 lintOptions {
57 abortOnError false
58 }
59}
60
61if (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
69dependencies {
70 unimodule "unimodules-core"
71}