UNPKG

2.13 kBPlain TextView Raw
1apply plugin: 'com.android.library'
2apply plugin: 'kotlin-android'
3apply plugin: 'maven'
4
5buildscript {
6 // Simple helper that allows the root project to override versions declared by this library.
7 ext.safeExtGet = { prop, fallback ->
8 rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
9 }
10
11 repositories {
12 mavenCentral()
13 }
14
15 dependencies {
16 classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet("kotlinVersion", "1.3.50")}")
17 }
18}
19
20group = 'host.exp.exponent'
21version = '1.1.1'
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", 29)
50
51 defaultConfig {
52 minSdkVersion safeExtGet("minSdkVersion", 21)
53 targetSdkVersion safeExtGet("targetSdkVersion", 28)
54 versionCode 5
55 versionName "1.1.1"
56 }
57 lintOptions {
58 abortOnError false
59 }
60 compileOptions {
61 sourceCompatibility = '1.8'
62 targetCompatibility = '1.8'
63 }
64}
65
66repositories {
67 mavenCentral()
68}
69
70if (new File(rootProject.projectDir.parentFile, 'package.json').exists()) {
71 apply from: project(":unimodules-core").file("../unimodules-core.gradle")
72} else {
73 throw new GradleException(
74 '\'unimodules-core.gradle\' was not found in the usual Flutter or React Native dependency locations. ' +
75 'This package can only be used in such projects. Are you sure you\'ve installed the dependencies properly?')
76}
77
78dependencies {
79 unimodule 'unimodules-core'
80 unimodule 'unimodules-image-loader-interface'
81
82 api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.3.50')}"
83 api 'com.github.bumptech.glide:glide:4.9.0'
84 api 'com.facebook.fresco:fresco:2.0.0'
85}