1 | apply plugin: 'com.android.library'
|
2 | apply plugin: 'kotlin-android'
|
3 | apply plugin: 'maven-publish'
|
4 |
|
5 | group = 'host.exp.exponent'
|
6 | version = '10.1.0'
|
7 |
|
8 | buildscript {
|
9 | def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
10 | if (expoModulesCorePlugin.exists()) {
|
11 | apply from: expoModulesCorePlugin
|
12 | applyKotlinExpoModulesCorePlugin()
|
13 | }
|
14 |
|
15 |
|
16 | ext.safeExtGet = { prop, fallback ->
|
17 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
18 | }
|
19 |
|
20 |
|
21 | ext.getKotlinVersion = {
|
22 | if (ext.has("kotlinVersion")) {
|
23 | ext.kotlinVersion()
|
24 | } else {
|
25 | ext.safeExtGet("kotlinVersion", "1.6.10")
|
26 | }
|
27 | }
|
28 |
|
29 | repositories {
|
30 | mavenCentral()
|
31 | }
|
32 |
|
33 | dependencies {
|
34 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
35 | }
|
36 | }
|
37 |
|
38 |
|
39 | task androidSourcesJar(type: Jar) {
|
40 | classifier = 'sources'
|
41 | from android.sourceSets.main.java.srcDirs
|
42 | }
|
43 |
|
44 | afterEvaluate {
|
45 | publishing {
|
46 | publications {
|
47 | release(MavenPublication) {
|
48 | from components.release
|
49 |
|
50 | artifact(androidSourcesJar)
|
51 | }
|
52 | }
|
53 | repositories {
|
54 | maven {
|
55 | url = mavenLocal().url
|
56 | }
|
57 | }
|
58 | }
|
59 | }
|
60 |
|
61 | android {
|
62 | compileSdkVersion safeExtGet("compileSdkVersion", 31)
|
63 |
|
64 | compileOptions {
|
65 | sourceCompatibility JavaVersion.VERSION_11
|
66 | targetCompatibility JavaVersion.VERSION_11
|
67 | }
|
68 |
|
69 | kotlinOptions {
|
70 | jvmTarget = JavaVersion.VERSION_11.majorVersion
|
71 | }
|
72 |
|
73 | defaultConfig {
|
74 | minSdkVersion safeExtGet("minSdkVersion", 21)
|
75 | targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
76 | versionCode 16
|
77 | versionName "10.1.0"
|
78 | }
|
79 | lintOptions {
|
80 | abortOnError false
|
81 | }
|
82 | }
|
83 |
|
84 | dependencies {
|
85 | implementation project(':expo-modules-core')
|
86 |
|
87 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
88 | }
|