-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate to kotlin dsl & add buildSrc for management gradle
Showing
17 changed files
with
284 additions
and
212 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,76 @@ | ||
import com.dapascript.buildsrc.Libs | ||
|
||
plugins { | ||
id("com.android.application") | ||
id("com.google.devtools.ksp") | ||
id("org.jetbrains.kotlin.android") | ||
id("org.jetbrains.kotlin.kapt") | ||
id("dagger.hilt.android.plugin") | ||
id("com.google.gms.google-services") | ||
id("com.google.firebase.crashlytics") | ||
} | ||
|
||
android { | ||
namespace = "com.prodev.muslimq" | ||
compileSdk = 34 | ||
|
||
signingConfigs { | ||
create("release") { | ||
storeFile = file("D:\\Projek\\Key\\muslimkey.jks") | ||
storePassword = "Lutpi220201" | ||
keyAlias = "muslimq" | ||
keyPassword = "Lutpi220201" | ||
} | ||
} | ||
|
||
defaultConfig { | ||
applicationId = Libs.appId | ||
minSdk = Libs.minSdk | ||
targetSdk = Libs.targetSdk | ||
versionCode = Libs.versionCode | ||
versionName = Libs.versionName | ||
|
||
testInstrumentationRunner = Libs.testInstrumentationRunner | ||
vectorDrawables.useSupportLibrary = true | ||
signingConfig = signingConfigs.getByName("release") | ||
} | ||
|
||
android { | ||
ndkVersion = "21.4.7075529" | ||
} | ||
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = true | ||
isShrinkResources = true | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
getByName("debug") { | ||
applicationIdSuffix = ".debug" | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = "17" | ||
} | ||
|
||
buildFeatures { | ||
viewBinding = true | ||
} | ||
} | ||
|
||
dependencies { | ||
// Apply shared dependencies | ||
Libs.applySharedDeps(dependencies) | ||
|
||
// Core | ||
implementation(project(":core")) | ||
} |
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
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
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
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,18 @@ | ||
// change to kts | ||
buildscript { | ||
dependencies { | ||
classpath("com.android.tools.build:gradle:8.1.0") | ||
classpath("com.google.gms:google-services:4.3.15") | ||
classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.8") | ||
} | ||
} | ||
|
||
plugins { | ||
id("com.android.application") version "8.1.0" apply false | ||
id("com.android.library") version "8.1.0" apply false | ||
id("org.jetbrains.kotlin.android") version "1.8.20" apply false | ||
id("org.jetbrains.kotlin.plugin.serialization") version "1.8.20" apply false | ||
id("com.google.dagger.hilt.android") version "2.44" apply false | ||
id("com.google.devtools.ksp") version "1.8.21-1.0.11" apply false | ||
id("org.jetbrains.kotlin.jvm") version "1.8.21" apply false | ||
} |
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 @@ | ||
/build |
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,9 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} |
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,77 @@ | ||
package com.dapascript.buildsrc | ||
|
||
import org.gradle.api.artifacts.dsl.DependencyHandler | ||
|
||
object Libs { | ||
|
||
const val appId = "com.prodev.muslimq" | ||
const val minSdk = 24 | ||
const val targetSdk = 34 | ||
const val versionCode = 20231018 | ||
const val versionName = "2.7.1" | ||
const val testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
|
||
private fun DependencyHandler.implementation(dependency: Any) { | ||
add("implementation", dependency) | ||
} | ||
|
||
private fun DependencyHandler.kapt(dependency: Any) { | ||
add("kapt", dependency) | ||
} | ||
|
||
private fun DependencyHandler.debugImplementation(dependency: Any) { | ||
add("debugImplementation", dependency) | ||
} | ||
|
||
private fun DependencyHandler.releaseImplementation(dependency: Any) { | ||
add("releaseImplementation", dependency) | ||
} | ||
|
||
fun applySharedDeps(dependencyHandler: DependencyHandler) { | ||
dependencyHandler.apply { | ||
// Main | ||
implementation("androidx.core:core-ktx:1.12.0") | ||
implementation("androidx.appcompat:appcompat:1.6.1") | ||
implementation("com.google.android.material:material:1.10.0") | ||
implementation("androidx.constraintlayout:constraintlayout:2.1.4") | ||
implementation("androidx.datastore:datastore-preferences:1.0.0") | ||
|
||
// Testing | ||
implementation("junit:junit:4.13.2") | ||
implementation("androidx.test.ext:junit:1.1.5") | ||
implementation("androidx.test.espresso:espresso-core:3.5.1") | ||
|
||
// Appearance | ||
implementation("com.github.bumptech.glide:glide:4.14.2") | ||
implementation("com.airbnb.android:lottie:5.2.0") | ||
implementation("com.facebook.shimmer:shimmer:0.5.0") | ||
implementation("com.github.SimformSolutionsPvtLtd:SSPullToRefresh:1.3") | ||
implementation("com.tbuonomo:dotsindicator:4.2") | ||
implementation("com.aminography:primecalendar:1.7.0") | ||
|
||
// Navigation | ||
val navigationVersion = "2.5.3" | ||
implementation("androidx.navigation:navigation-fragment-ktx:$navigationVersion") | ||
implementation("androidx.navigation:navigation-ui-ktx:$navigationVersion") | ||
|
||
// Dagger hilt | ||
val daggerHiltVersion = "2.44" | ||
implementation("com.google.dagger:hilt-android:$daggerHiltVersion") | ||
kapt("com.google.dagger:hilt-android-compiler:$daggerHiltVersion") | ||
|
||
// Chuck library | ||
val chuckVersion = "3.5.2" | ||
debugImplementation("com.github.chuckerteam.chucker:library:$chuckVersion") | ||
releaseImplementation("com.github.chuckerteam.chucker:library-no-op:$chuckVersion") | ||
|
||
// Firebase | ||
implementation("com.google.firebase:firebase-crashlytics-ktx:18.4.3") | ||
|
||
// API Splash Screen | ||
implementation("androidx.core:core-splashscreen:1.0.1") | ||
|
||
// ShowCaseView | ||
implementation("uk.co.samuelwall:material-tap-target-prompt:3.3.2") | ||
} | ||
} | ||
} |
Oops, something went wrong.