-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
82 lines (72 loc) · 2.48 KB
/
build.gradle
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
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
android {
compileSdkVersion 34//flutter.compileSdkVersion
namespace = "com.example.canopas_unity"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.canopas.projectunity"
minSdkVersion 34
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "ProjectUnity-${variant.name}-${versionName}-${versionCode}.apk"
}
}
}
signingConfigs {
if (System.getenv("APKSIGN_KEYSTORE") != null) {
release {
storeFile file(System.getenv("APKSIGN_KEYSTORE"))
storePassword System.getenv("APKSIGN_KEYSTORE_PASS")
keyAlias System.getenv("APKSIGN_KEY_ALIAS")
keyPassword System.getenv("APKSIGN_KEY_PASS")
}
} else {
release {
keyAlias 'ProjectUnity'
keyPassword 'ProjectUnity'
storeFile file('development.jks')
storePassword 'ProjectUnity'
}
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
minifyEnabled true
debuggable false
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
minifyEnabled true
debuggable true
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}