Skip to content

Commit

Permalink
feat: Migrate from Groovy to Kotlin DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrDeveloper committed May 15, 2024
1 parent 1cb6be7 commit 33bee30
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 41 deletions.
39 changes: 19 additions & 20 deletions app/build.gradle → app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,40 @@ plugins {
}

android {
compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
applicationId "com.amrdeveloper.linkhub"
minSdkVersion 19
compileSdk 34
targetSdkVersion 34
versionCode 23
versionName "1.6.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
applicationId = "com.amrdeveloper.linkhub"
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
multiDexEnabled = true
versionCode = 23
versionName = "1.6.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}

multiDexEnabled true
}

buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

buildFeatures {
viewBinding true
viewBinding = true
}
}

Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions build.gradle → build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ plugins {
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.ksp) apply false
}

tasks.register('clean', Delete) {
delete rootProject.buildDir
}
19 changes: 6 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,10 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
org.gradle.jvmargs=-Xmx4608m -Dfile.encoding=UTF-8
org.gradle.parallel=true

room.incremental=true

kapt.use.worker.api=false
kapt.incremental.apt=false
android.useAndroidX=true
kotlin.code.style=official
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[versions]
kotlin = "1.9.10"
androidGradlePlugin = "7.4.2"
compileSdk = "34"
targetSdk = "33"
minSdk = "19"
androidx-junit = "1.1.5"
appcompat = "1.6.1"
core-testing = "2.1.0"
Expand Down
6 changes: 2 additions & 4 deletions settings.gradle → settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
pluginManagement {
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
gradlePluginPortal()
google()
mavenCentral()

}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
Expand All @@ -18,4 +16,4 @@ dependencyResolutionManagement {
}

rootProject.name = "LinkHub"
include ':app'
include(":app")

0 comments on commit 33bee30

Please sign in to comment.