generated from frogobox/frogo-android-sdk
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
117 lines (87 loc) · 3.53 KB
/
build.gradle.kts
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.compose") version Dependency.COMPOSE_MULTIPLATFORM_VERSION
id("kotlin-kapt")
}
android {
compileSdk = ProjectSetting.PROJECT_COMPILE_SDK
defaultConfig {
applicationId = ProjectSetting.PROJECT_APP_ID
minSdk = ProjectSetting.PROJECT_MIN_SDK
targetSdk = ProjectSetting.PROJECT_TARGET_SDK
versionCode = ProjectSetting.PROJECT_VERSION_CODE
versionName = ProjectSetting.PROJECT_VERSION_NAME
multiDexEnabled = true
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
// Declaration build config
buildConfigField("String", "DATABASE_NAME", ProjectSetting.DB)
// Naming APK // AAB
setProperty("archivesBaseName", "${ProjectSetting.NAME_APK}(${versionName})")
// Declaration apps name debug mode
val debugAttribute = "Development"
val nameAppDebug = "${ProjectSetting.NAME_APP} $debugAttribute"
resourceConfigurations += setOf("en", "id")
// Inject app name for debug
resValue("string", "app_name", nameAppDebug)
}
signingConfigs {
create("release") {
// You need to specify either an absolute path or include the
// keystore file in the same directory as the build.gradle file.
// [PROJECT FOLDER NAME/app/[COPY YOUT KEY STORE] .jks in here
storeFile = file(ProjectSetting.PLAYSTORE_STORE_FILE)
storePassword = ProjectSetting.PLAYSTORE_STORE_PASSWORD
keyAlias = ProjectSetting.PLAYSTORE_KEY_ALIAS
keyPassword = ProjectSetting.PLAYSTORE_KEY_PASSWORD
}
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
// Generated Signed APK / AAB
signingConfig = signingConfigs.getByName("release")
// Inject app name for release
resValue("string", "app_name", ProjectSetting.APP_NAME)
}
}
buildFeatures {
viewBinding = true
compose = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
composeOptions {
kotlinCompilerExtensionVersion = Dependency.COMPOSE_VERSION
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Dependency.KOTLIN_VERSION}")
implementation(project(":frogosdk"))
implementation("androidx.core:core-ktx:1.7.0")
implementation("androidx.appcompat:appcompat:1.4.1")
implementation("androidx.work:work-runtime-ktx:2.7.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.3")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
implementation("androidx.activity:activity-compose:1.4.0")
implementation(compose.ui)
implementation(compose.runtime)
implementation(compose.preview)
implementation(compose.uiTooling)
implementation(compose.material)
implementation(compose.materialIconsExtended)
implementation("com.google.code.gson:gson:2.8.9")
implementation("com.google.android.material:material:1.5.0")
}