-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
87 lines (77 loc) · 3.05 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
87 lines (77 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import java.io.FileInputStream
import java.util.Properties
plugins {
id("com.android.application")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
// Firebase (processes google-services.json).
id("com.google.gms.google-services")
}
// Release signing is read from android/key.properties (kept out of version control;
// supplied locally or by CI). Falls back to debug signing when absent.
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
android {
namespace = "com.exptech.dpip"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
// Required by awesome_notifications (uses desugared java.time/etc.).
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
defaultConfig {
applicationId = "com.exptech.dpip"
minSdk = 26
targetSdk = flutter.targetSdkVersion
versionCode = 300909009
versionName = flutter.versionName
}
signingConfigs {
create("release") {
if (keystorePropertiesFile.exists()) {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = (keystoreProperties["storeFile"] as String?)?.let { file(it) }
storePassword = keystoreProperties["storePassword"] as String
}
}
}
buildTypes {
release {
signingConfig =
if (keystorePropertiesFile.exists()) {
signingConfigs.getByName("release")
} else {
signingConfigs.getByName("debug")
}
}
}
}
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
flutter {
source = "../.."
}
dependencies {
// Lets MapSnapshotChannel / MapCacheChannel use MapLibre APIs directly:
// the maplibre_gl plugin's SDK isn't on the app's compile classpath.
// maplibre_gl ≥0.26 switched to the OpenGL artifact and excludes the
// unsuffixed `android-sdk` — keep this in sync or mergeReleaseNativeLibs
// dies on duplicate `lib/arm64-v8a/libmaplibre.so`.
implementation("org.maplibre.gl:android-sdk-opengl:13.3.0")
// Lets the native background-location layer use the Fused Location Provider
// and Geofencing API directly. Already in the APK transitively via
// geolocator / maplibre_gl; this promotes it to the app's compile
// classpath. Keep ≥ maplibre_gl's pin (21.3.0).
implementation("com.google.android.gms:play-services-location:21.3.0")
// Backports java.time/etc. for awesome_notifications (see compileOptions).
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
}