Initial commit
This commit is contained in:
commit
2c5d9b6df1
115 changed files with 5026 additions and 0 deletions
122
app/build.gradle.kts
Normal file
122
app/build.gradle.kts
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
import java.nio.charset.Charset
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
alias(libs.plugins.jetbrains.kotlin.serialization)
|
||||
alias(libs.plugins.hilt)
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.pixelized.headache"
|
||||
compileSdk = 36
|
||||
|
||||
signingConfigs {
|
||||
create("pixelized") {
|
||||
storeFile =
|
||||
(project.properties["PIXELIZED_RELEASE_STORE_FILE"] as? String)?.let { file(it) }
|
||||
storePassword = project.properties["PIXELIZED_RELEASE_STORE_PASSWORD"] as? String
|
||||
keyAlias = project.properties["PIXELIZED_RELEASE_KEY_ALIAS"] as? String
|
||||
keyPassword = project.properties["PIXELIZED_RELEASE_KEY_PASSWORD"] as? String
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
namespace = "com.pixelized.headache"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
applicationIdSuffix = ".dev"
|
||||
isDebuggable = true
|
||||
isMinifyEnabled = false
|
||||
defaultConfig {
|
||||
versionCode = 1
|
||||
}
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
release {
|
||||
isDebuggable = false
|
||||
isMinifyEnabled = true
|
||||
signingConfig = signingConfigs.getByName("pixelized")
|
||||
defaultConfig {
|
||||
versionCode = 1 // getGitBuildNumber()
|
||||
}
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
}
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.lifecycle.runtime.ktx)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
implementation(platform(libs.androidx.compose.bom))
|
||||
implementation(libs.androidx.ui)
|
||||
implementation(libs.androidx.ui.graphics)
|
||||
implementation(libs.androidx.ui.tooling.preview)
|
||||
implementation(libs.androidx.material3)
|
||||
implementation(libs.androidx.material3.windowsizeclass)
|
||||
implementation(libs.androidx.adaptive.layout)
|
||||
implementation(libs.androidx.material3.navigation3)
|
||||
|
||||
implementation(libs.androidx.datastore)
|
||||
implementation(libs.kotlinx.serialization.core)
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
implementation(libs.androidx.navigation3.runtime)
|
||||
implementation(libs.androidx.navigation3.ui)
|
||||
implementation(libs.androidx.hilt.navigation.compose)
|
||||
implementation(libs.androidx.lifecycle.viewmodel.navigation3)
|
||||
implementation(libs.androidx.material.icons.extended)
|
||||
|
||||
implementation(libs.hilt.android)
|
||||
ksp(libs.hilt.compiler)
|
||||
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.androidx.junit)
|
||||
androidTestImplementation(libs.androidx.espresso.core)
|
||||
androidTestImplementation(platform(libs.androidx.compose.bom))
|
||||
androidTestImplementation(libs.androidx.ui.test.junit4)
|
||||
debugImplementation(libs.androidx.ui.tooling)
|
||||
debugImplementation(libs.androidx.ui.test.manifest)
|
||||
}
|
||||
|
||||
private fun getGitBuildNumber(
|
||||
charset: Charset = Charset.defaultCharset(),
|
||||
): Int {
|
||||
return try {
|
||||
val stdout = org.apache.commons.io.output.ByteArrayOutputStream()
|
||||
rootProject.exec {
|
||||
commandLine("git", "rev-list", "--count", "HEAD")
|
||||
standardOutput = stdout
|
||||
}
|
||||
stdout.toString(charset).trim().toInt()
|
||||
} catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue