UNPKG

1.85 kBPlain TextView Raw
1apply plugin: 'com.android.library'
2apply plugin: 'kotlin-android'
3apply plugin: 'maven-publish'
4
5group = 'host.exp.exponent'
6version = '11.2.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// Creating sources with comments
24task androidSourcesJar(type: Jar) {
25 classifier = 'sources'
26 from android.sourceSets.main.java.srcDirs
27}
28
29afterEvaluate {
30 publishing {
31 publications {
32 release(MavenPublication) {
33 from components.release
34 // Add additional sourcesJar to artifacts
35 artifact(androidSourcesJar)
36 }
37 }
38 repositories {
39 maven {
40 url = mavenLocal().url
41 }
42 }
43 }
44}
45
46android {
47 compileSdkVersion safeExtGet("compileSdkVersion", 30)
48
49 compileOptions {
50 sourceCompatibility JavaVersion.VERSION_1_8
51 targetCompatibility JavaVersion.VERSION_1_8
52 }
53
54 kotlinOptions {
55 jvmTarget = JavaVersion.VERSION_1_8
56 }
57
58 defaultConfig {
59 minSdkVersion safeExtGet("minSdkVersion", 21)
60 targetSdkVersion safeExtGet("targetSdkVersion", 30)
61 versionCode 26
62 versionName "11.2.1"
63 }
64 lintOptions {
65 abortOnError false
66 }
67}
68
69dependencies {
70 implementation project(':expo-modules-core')
71
72 api 'com.google.android.gms:play-services-vision:19.0.0'
73 api 'com.google.zxing:core:3.3.3'
74
75 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
76 implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3")
77 implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1")
78}