mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 21:27:01 +05:30
build: convert to Gradle Kotlin DSL
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
9839bf4014
commit
1e2fef884f
19 changed files with 514 additions and 230 deletions
100
app/build.gradle.kts
Normal file
100
app/build.gradle.kts
Normal file
|
@ -0,0 +1,100 @@
|
|||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
kotlin("android")
|
||||
kotlin("kapt")
|
||||
id("dagger.hilt.android.plugin")
|
||||
`lobsters-plugin`
|
||||
`core-library-desugaring`
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { setUrl("https://jitpack.io") }
|
||||
}
|
||||
|
||||
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
|
||||
android {
|
||||
adbOptions.installOptions("--user 0")
|
||||
defaultConfig {
|
||||
applicationId = "dev.msfjarvis.lobsters"
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
javaCompileOptions.annotationProcessorOptions {
|
||||
argument("room.schemaLocation", "${projectDir}/schemas")
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
named("release") {
|
||||
isMinifyEnabled = true
|
||||
setProguardFiles(listOf("proguard-android-optimize.txt", "proguard-rules.pro"))
|
||||
}
|
||||
}
|
||||
|
||||
buildFeatures.compose = true
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerVersion = "1.4.10"
|
||||
kotlinCompilerExtensionVersion = Dependencies.COMPOSE_VERSION
|
||||
}
|
||||
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
val keystoreProperties = Properties()
|
||||
keystoreProperties.load(keystorePropertiesFile.inputStream())
|
||||
signingConfigs {
|
||||
register("release") {
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
storeFile = rootProject.file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
}
|
||||
}
|
||||
listOf("release", "debug").map {
|
||||
buildTypes.getByName(it).signingConfig = signingConfigs.getByName(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
kapt(Dependencies.ThirdParty.Roomigrant.compiler)
|
||||
kapt(Dependencies.AndroidX.Hilt.daggerCompiler)
|
||||
kapt(Dependencies.AndroidX.Hilt.daggerHiltCompiler)
|
||||
kapt(Dependencies.AndroidX.Room.compiler)
|
||||
implementation(project(":lobsters-api"))
|
||||
implementation(project(":model"))
|
||||
implementation(Dependencies.AndroidX.coreKtx)
|
||||
implementation(Dependencies.AndroidX.activityKtx)
|
||||
implementation(Dependencies.AndroidX.appCompat)
|
||||
implementation(Dependencies.AndroidX.browser)
|
||||
implementation(Dependencies.AndroidX.Compose.foundation)
|
||||
implementation(Dependencies.AndroidX.Compose.foundationLayout)
|
||||
implementation(Dependencies.AndroidX.Compose.foundationText)
|
||||
implementation(Dependencies.AndroidX.Compose.runtime)
|
||||
implementation(Dependencies.AndroidX.Compose.material)
|
||||
implementation(Dependencies.AndroidX.Compose.compiler)
|
||||
implementation(Dependencies.AndroidX.Compose.ui)
|
||||
implementation(Dependencies.AndroidX.Compose.uiTooling)
|
||||
implementation(Dependencies.AndroidX.Compose.uiText)
|
||||
implementation(Dependencies.AndroidX.Compose.uiTextAndroid)
|
||||
implementation(Dependencies.AndroidX.Compose.uiUnit)
|
||||
implementation(Dependencies.AndroidX.Hilt.hiltLifecycleViewmodel)
|
||||
implementation(Dependencies.AndroidX.Lifecycle.runtimeKtx)
|
||||
implementation(Dependencies.AndroidX.Lifecycle.viewmodelKtx)
|
||||
implementation(Dependencies.AndroidX.Compose.navigation)
|
||||
implementation(Dependencies.AndroidX.Room.runtime)
|
||||
implementation(Dependencies.AndroidX.Room.ktx)
|
||||
implementation(Dependencies.ThirdParty.Roomigrant.runtime)
|
||||
implementation(Dependencies.AndroidX.material)
|
||||
implementation(Dependencies.AndroidX.Hilt.dagger)
|
||||
implementation(Dependencies.ThirdParty.Moshi.lib)
|
||||
implementation(Dependencies.ThirdParty.accompanist)
|
||||
implementation(Dependencies.Kotlin.Coroutines.android)
|
||||
implementation(Dependencies.ThirdParty.customtabs)
|
||||
androidTestImplementation(Dependencies.Testing.daggerHilt)
|
||||
testImplementation(Dependencies.Testing.junit)
|
||||
androidTestImplementation(Dependencies.Testing.uiTest)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue