1 |
|
2 | buildscript {
|
3 | repositories {
|
4 | jcenter()
|
5 | maven {
|
6 | url 'https://maven.google.com/'
|
7 | name 'Google'
|
8 | }
|
9 | }
|
10 |
|
11 | dependencies {
|
12 | classpath 'com.android.tools.build:gradle:3.1.3'
|
13 | }
|
14 | }
|
15 |
|
16 | apply plugin: 'com.android.library'
|
17 | apply plugin: 'maven'
|
18 |
|
19 | group = 'host.exp.exponent'
|
20 | version = '1.0.0'
|
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 26
|
49 |
|
50 | defaultConfig {
|
51 | minSdkVersion 19
|
52 | targetSdkVersion 26
|
53 | versionCode 1
|
54 | versionName "1.0.1"
|
55 | }
|
56 | lintOptions {
|
57 | abortOnError false
|
58 | }
|
59 | }
|
60 |
|
61 | repositories {
|
62 | mavenCentral()
|
63 | }
|
64 |
|
65 | if (new File(rootProject.projectDir.parentFile, 'pubspec.yaml').exists()) {
|
66 | apply from: project(":expo_core").file("../expo-core.gradle")
|
67 | } else if (new File(rootProject.projectDir.parentFile, 'package.json').exists()) {
|
68 | apply from: project(":expo-core").file("../expo-core.gradle")
|
69 | } else {
|
70 | throw new GradleException(
|
71 | "'expo-core.gradle' was not found in the usual Flutter or React Native dependency locations. " +
|
72 | "This package can only be used in such projects. Are you sure you've installed the dependencies properly?")
|
73 | }
|
74 |
|
75 | dependencies {
|
76 | expendency "expo-core"
|
77 | }
|
78 |
|