UNPKG

2.27 kBPlain TextView Raw
1apply plugin: 'com.android.library'
2apply plugin: 'kotlin-android'
3apply plugin: 'maven'
4
5group = 'host.exp.exponent'
6version = '11.1.1'
7
8buildscript {
9 // Simple helper that allows the root project to override versions declared by this library.
10 ext.safeExtGet = { prop, fallback ->
11 rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
12 }
13
14 repositories {
15 mavenCentral()
16 }
17
18 dependencies {
19 classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
20 }
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", 30)
50
51 compileOptions {
52 sourceCompatibility JavaVersion.VERSION_1_8
53 targetCompatibility JavaVersion.VERSION_1_8
54 }
55
56 defaultConfig {
57 minSdkVersion safeExtGet("minSdkVersion", 21)
58 targetSdkVersion safeExtGet("targetSdkVersion", 30)
59 versionCode 30
60 versionName "11.1.1"
61 }
62 lintOptions {
63 abortOnError false
64 }
65}
66
67repositories {
68 mavenCentral()
69}
70
71if (new File(rootProject.projectDir.parentFile, 'package.json').exists()) {
72 apply from: project(":unimodules-core").file("../unimodules-core.gradle")
73} else {
74 throw new GradleException(
75 "'unimodules-core.gradle' was not found in the usual React Native dependency location. " +
76 "This package can only be used in such projects. Are you sure you've installed the dependencies properly?")
77}
78
79dependencies {
80 unimodule 'unimodules-core'
81 unimodule 'expo-modules-core'
82
83 api 'commons-codec:commons-codec:1.10'
84 api 'commons-io:commons-io:1.4'
85 api 'com.squareup.okhttp3:okhttp:3.10.0'
86 api 'com.squareup.okhttp3:okhttp-urlconnection:3.10.0'
87 api "androidx.legacy:legacy-support-v4:1.0.0"
88
89 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
90}