Skip to content

Commit

Permalink
Migrate gradle to kts
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnlm committed Nov 15, 2023
1 parent 453d271 commit 130e0e3
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 98 deletions.
1 change: 0 additions & 1 deletion about/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ android {
}
}


dependencies {
// Dependencies must be hardcoded to support F-droid

Expand Down
96 changes: 0 additions & 96 deletions common/build.gradle

This file was deleted.

93 changes: 93 additions & 0 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
plugins {
id("com.android.library")
id("kotlin-android")
}

android {
namespace = "dev.lucasnlm.antimine.common"

defaultConfig {
// versionCode and versionName must be hardcoded to support F-droid
minSdk = 21
compileSdk = 34
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = true
setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"))
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

buildFeatures {
buildConfig = true
viewBinding = true
}
}

dependencies {
// Dependencies must be hardcoded to support F-droid

implementation(project(":core"))
implementation(project(":external"))
implementation(project(":i18n"))
implementation(project(":preferences"))
implementation(project(":ui"))
implementation(project(":utils"))
implementation(project(":gdx"))
implementation(project(":sgtatham"))
implementation(project(":control"))

// AndroidX
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.preference:preference-ktx:1.2.1")
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation("androidx.activity:activity-ktx:1.8.0")
implementation("androidx.fragment:fragment-ktx:1.6.2")

// Google
implementation("com.google.android.material:material:1.10.0")

// Constraint
implementation("androidx.constraintlayout:constraintlayout:2.1.4")

// Lifecycle
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")

// Koin
implementation("io.insert-koin:koin-android:3.1.2")
testImplementation("io.insert-koin:koin-test:3.1.2")

// Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")

// Kotlin Lib
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.10")

// Unit Tests
testImplementation("junit:junit:4.13.2")
testImplementation("org.mockito:mockito-core:4.6.1")
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0")
testImplementation("io.mockk:mockk:1.13.5")

// Core library
androidTestImplementation("androidx.test:core:1.5.0")

// AndroidJUnitRunner and JUnit Rules
androidTestImplementation("androidx.test:runner:1.5.2")
androidTestImplementation("androidx.test:rules:1.5.0")
androidTestUtil("androidx.test:orchestrator:1.4.2")
}
2 changes: 1 addition & 1 deletion common/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down

0 comments on commit 130e0e3

Please sign in to comment.