Skip to content

Commit

Permalink
Port build.gradle to Kotlin
Browse files Browse the repository at this point in the history
Move kotlin code to kotlin folder
  • Loading branch information
rumboalla committed Aug 24, 2023
1 parent 9c17950 commit 4c7e028
Show file tree
Hide file tree
Showing 83 changed files with 112 additions and 108 deletions.
108 changes: 0 additions & 108 deletions app/build.gradle

This file was deleted.

112 changes: 112 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import java.util.Properties
import java.io.FileInputStream
import com.android.build.gradle.internal.api.BaseVariantOutputImpl

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}

android {
namespace = "com.apkupdater"
compileSdk = 34

defaultConfig {
applicationId = "com.apkupdater"
minSdk = 21
targetSdk = 34
versionCode = 48
versionName = "3.0.0-beta-05"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}

signingConfigs {
create("release") {
try {
val props = Properties()
props.load(FileInputStream(file("../local.properties")))
storeFile = file(props.getProperty("keystore.file"))
storePassword = props.getProperty("keystore.password")
keyAlias = props.getProperty("keystore.keyalias")
keyPassword = props.getProperty("keystore.keypassword")
} catch (ignored: Exception) {
val config = signingConfigs.getByName("debug")
storeFile = config.storeFile
storePassword = config.storePassword
keyAlias = config.keyAlias
keyPassword = config.keyPassword
println("Signing config not found. Using debug settings.")
}
enableV3Signing = true
}
}

buildTypes {
getByName("release") {
signingConfig = signingConfigs.getByName("release")
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

applicationVariants.configureEach {
outputs.configureEach {
val variant = (this as BaseVariantOutputImpl)
variant.outputFileName = defaultConfig.applicationId + "-" + buildType.name + ".apk"
}
}

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

kotlinOptions { jvmTarget = "1.8" }
buildFeatures { compose = true }
composeOptions { kotlinCompilerExtensionVersion = "1.5.1" }

packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}

lint {
disable.addAll(arrayOf("ExtraTranslation", "MissingTranslation"))
}
}

dependencies {

implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.activity:activity-compose:1.7.2")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.6.1")
implementation("androidx.compose.ui:ui:1.5.0")
implementation("androidx.tv:tv-foundation:1.0.0-alpha08")
implementation("androidx.compose.material3:material3:1.2.0-alpha06")
implementation("androidx.work:work-runtime-ktx:2.8.1")
implementation("io.insert-koin:koin-android:3.4.2")
implementation("io.insert-koin:koin-androidx-compose:3.4.2")
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.11.0")
implementation("com.google.code.gson:gson:2.10.1")
implementation("io.coil-kt:coil-compose:2.4.0")
implementation("com.github.rumboalla.KryptoPrefs:kryptoprefs:0.4.3")
implementation("com.github.rumboalla.KryptoPrefs:kryptoprefs-gson:0.4.3")
implementation("org.jsoup:jsoup:1.16.1")
implementation("eu.chainfire:libsuperuser:1.1.1")
implementation("io.github.g00fy2:versioncompare:1.5.0")

testImplementation("junit:junit:4.13.2")

androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.5.0")

debugImplementation("androidx.compose.ui:ui-tooling:1.5.0")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.5.0")

}

0 comments on commit 4c7e028

Please sign in to comment.