-
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.
Migrate Gradle files to use Kotlin DSL
- Loading branch information
Showing
11 changed files
with
297 additions
and
210 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,144 @@ | ||
import com.google.protobuf.gradle.builtins | ||
import com.google.protobuf.gradle.generateProtoTasks | ||
import com.google.protobuf.gradle.protobuf | ||
import com.google.protobuf.gradle.protoc | ||
|
||
plugins { | ||
alias(libs.plugins.android.application) | ||
alias(libs.plugins.kotlin.android) | ||
alias(libs.plugins.kotlin.kapt) | ||
alias(libs.plugins.safeargs) | ||
alias(libs.plugins.hilt) | ||
alias(libs.plugins.protobuf) | ||
} | ||
|
||
android { | ||
namespace = "com.devdunnapps.amplify" | ||
|
||
compileSdk = 33 | ||
buildToolsVersion = "33.0.0" | ||
|
||
defaultConfig { | ||
applicationId = "com.devdunnapps.amplify" | ||
minSdk = 21 | ||
targetSdk = 33 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
val debug by getting { | ||
applicationIdSuffix = ".debug" | ||
} | ||
|
||
val release by getting { | ||
isMinifyEnabled = true | ||
isShrinkResources = true | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" | ||
} | ||
|
||
buildFeatures { | ||
viewBinding = true | ||
compose = true | ||
} | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = libs.androidx.compose.compiler.get().versionConstraint.toString() | ||
} | ||
|
||
lint { | ||
abortOnError = false | ||
} | ||
} | ||
|
||
kapt { | ||
correctErrorTypes = true | ||
} | ||
|
||
dependencies { | ||
implementation(libs.androidx.appcompat) | ||
implementation(libs.androidx.constraintLayout) | ||
implementation(libs.androidx.palette.ktx) | ||
implementation(libs.androidx.dataStore) | ||
implementation(libs.androidx.core.ktx) | ||
implementation(libs.androidx.preference.ktx) | ||
implementation(libs.androidx.media) | ||
|
||
implementation(libs.androidx.navigation.fragment) | ||
implementation(libs.androidx.navigation.compose) | ||
implementation(libs.androidx.navigation.ui.ktx) | ||
implementation(libs.androidx.hilt.navigation.compose) | ||
|
||
implementation(libs.androidx.lifecycle.viewModel.ktx) | ||
implementation(libs.androidx.lifecycle.runtime.ktx) | ||
implementation(libs.androidx.lifecycle.viewModelCompose) | ||
|
||
implementation(libs.material) | ||
|
||
implementation(libs.exoplayer.core) | ||
implementation(libs.exoplayer.ui) | ||
implementation(libs.exoplayer.mediaSession) | ||
|
||
implementation(libs.hilt.android) | ||
kapt(libs.hilt.compiler) | ||
|
||
implementation(libs.retrofit.core) | ||
implementation(libs.retrofit.converter.gson) | ||
|
||
implementation(libs.androidx.compose.animation) | ||
implementation(libs.androidx.compose.ui.tooling.preview) | ||
debugImplementation(libs.androidx.compose.ui.tooling) | ||
implementation(libs.androidx.compose.material.iconsExtended) | ||
compileOnly(libs.androidx.compose.compiler) | ||
implementation(libs.androidx.compose.paging) | ||
implementation(libs.androidx.activity.compose) | ||
implementation(libs.androidx.compose.material3) | ||
implementation(libs.androidx.compose.material3.windowSizeClass) | ||
implementation(libs.accompanist.themeAdapter.material3) | ||
|
||
implementation(libs.coil.kt) | ||
implementation(libs.coil.kt.compose) | ||
|
||
implementation (libs.protobuf.kotlin.lite) | ||
|
||
testImplementation(libs.junit4) | ||
testImplementation(libs.kotlinx.coroutines.test) | ||
testImplementation(libs.okhttp.mockWebServer) | ||
|
||
androidTestImplementation(libs.androidx.test.ext) | ||
androidTestImplementation(libs.androidx.test.espresso.core) | ||
androidTestImplementation(libs.androidx.compose.ui.test) | ||
} | ||
|
||
protobuf { | ||
protoc { | ||
artifact = libs.protobuf.protoc.get().toString() | ||
} | ||
|
||
generateProtoTasks { | ||
all().forEach { task -> | ||
task.builtins { | ||
val java by registering { | ||
option("lite") | ||
} | ||
|
||
val kotlin by registering { | ||
option("lite") | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
google() | ||
} |
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,13 @@ | ||
dependencyResolutionManagement { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} | ||
|
||
rootProject.name = "build-logic" |
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,20 @@ | ||
plugins { | ||
alias(libs.plugins.android.application) apply false | ||
alias(libs.plugins.kotlin.android) apply false | ||
alias(libs.plugins.kotlin.kapt) apply false | ||
alias(libs.plugins.safeargs) apply false | ||
alias(libs.plugins.hilt) apply false | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath(libs.android.gradlePlugin) | ||
classpath(libs.kotlin.gradlePlugin) | ||
classpath(libs.androidx.navigation.safeArgs) | ||
} | ||
} |
Oops, something went wrong.