|
1 | 1 | apply plugin: 'com.android.library' |
2 | | -apply plugin: 'kotlin-android' |
3 | | -apply plugin: 'maven-publish' |
4 | 2 |
|
5 | | -group = 'expo.modules.googlemaps' |
6 | | -version = '0.1.0' |
| 3 | +group = 'com.balloman.expo.googlemaps' |
| 4 | +version = '1.0.0' |
7 | 5 |
|
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 | | - // Simple helper that allows the root project to override versions declared by this library. |
16 | | - ext.safeExtGet = { prop, fallback -> |
17 | | - rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback |
18 | | - } |
| 6 | +def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle") |
| 7 | +apply from: expoModulesCorePlugin |
| 8 | +applyKotlinExpoModulesCorePlugin() |
| 9 | +useCoreDependencies() |
| 10 | +useExpoPublishing() |
19 | 11 |
|
20 | | - // Ensures backward compatibility |
21 | | - ext.getKotlinVersion = { |
22 | | - if (ext.has("kotlinVersion")) { |
23 | | - ext.kotlinVersion() |
24 | | - } else { |
25 | | - ext.safeExtGet("kotlinVersion", "1.8.21") |
26 | | - } |
27 | | - } |
| 12 | +// If you want to use the managed Android SDK versions from expo-modules-core, set this to true. |
| 13 | +// The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code. |
| 14 | +// Most of the time, you may like to manage the Android SDK versions yourself. |
28 | 15 |
|
29 | | - repositories { |
30 | | - mavenCentral() |
31 | | - } |
32 | | - |
33 | | - dependencies { |
34 | | - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}") |
35 | | - } |
36 | | -} |
| 16 | +def useManagedAndroidSDKVersions = true |
37 | 17 |
|
38 | | -afterEvaluate { |
39 | | - publishing { |
40 | | - publications { |
41 | | - release(MavenPublication) { |
42 | | - from components.release |
43 | | - } |
| 18 | +if (useManagedAndroidSDKVersions) { |
| 19 | + useDefaultAndroidSdkVersions() |
| 20 | +} else { |
| 21 | + buildscript { |
| 22 | + // Simple helper that allows the root project to override versions declared by this library. |
| 23 | + ext.safeExtGet = { prop, fallback -> |
| 24 | + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback |
44 | 25 | } |
45 | | - repositories { |
46 | | - maven { |
47 | | - url = mavenLocal().url |
48 | | - } |
| 26 | + } |
| 27 | + project.android { |
| 28 | + compileSdkVersion safeExtGet("compileSdkVersion", 34) |
| 29 | + defaultConfig { |
| 30 | + minSdkVersion safeExtGet("minSdkVersion", 23) |
| 31 | + targetSdkVersion safeExtGet("targetSdkVersion", 34) |
49 | 32 | } |
50 | 33 | } |
51 | 34 | } |
52 | 35 |
|
53 | 36 | android { |
54 | | - compileSdkVersion safeExtGet("compileSdkVersion", 34) |
55 | | - compileSdk(34) |
56 | | - |
57 | | - compileOptions { |
58 | | - sourceCompatibility JavaVersion.VERSION_17 |
59 | | - targetCompatibility JavaVersion.VERSION_17 |
60 | | - } |
61 | | - |
62 | | - kotlinOptions { |
63 | | - jvmTarget = JavaVersion.VERSION_17.majorVersion |
64 | | - } |
65 | | - |
66 | | - namespace "expo.modules.googlemaps" |
| 37 | + namespace "com.balloman.expo.googlemaps" |
67 | 38 | defaultConfig { |
68 | | - minSdkVersion safeExtGet("minSdkVersion", 23) |
69 | | - targetSdkVersion safeExtGet("targetSdkVersion", 34) |
70 | 39 | versionCode 1 |
71 | | - versionName "0.1.0" |
| 40 | + versionName "1.0.0" |
72 | 41 | } |
73 | 42 | lintOptions { |
74 | 43 | abortOnError false |
75 | 44 | } |
76 | | - publishing { |
77 | | - singleVariant("release") { |
78 | | - withSourcesJar() |
79 | | - } |
80 | | - } |
81 | 45 | } |
82 | 46 |
|
83 | 47 | repositories { |
84 | 48 | mavenCentral() |
85 | 49 | } |
86 | 50 |
|
87 | 51 | dependencies { |
88 | | - implementation project(':expo-modules-core') |
89 | 52 | implementation "com.facebook.react:react-native:0.20.1" |
90 | | - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" |
91 | 53 | implementation "com.google.android.gms:play-services-maps:18.2.0" |
92 | 54 | implementation 'androidx.appcompat:appcompat:1.6.1' |
93 | 55 | implementation 'com.google.maps.android:android-maps-utils:3.8.0' |
|
0 commit comments