This repository has been archived by the owner on Mar 14, 2023. It is now read-only.
forked from gayanvoice/android-animations-kotlin
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and rename build.gradle to build.gradle.kts
- Loading branch information
1 parent
c90b9e6
commit b156d71
Showing
2 changed files
with
95 additions
and
37 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("org.jetbrains.kotlin.android") | ||
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 | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
} | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
|
||
implementation(Androidx.appCompat) | ||
implementation(Androidx.appCompatResources) | ||
implementation(Androidx.constraintLayout) | ||
implementation(Androidx.Core.ktx) | ||
implementation(Androidx.Work.runtimeKtx) | ||
|
||
implementation(project(":library")) | ||
} |