Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
echo "NEW_VERSION_NAME=${new_version}" >> $GITHUB_ENV
echo "NEW_VERSION_CODE=${version_code}" >> $GITHUB_ENV

- name: Update build.gradle with new version code and version name
- name: Update build.gradle.kts with new version code and version name
run: |
# Update versionCode and versionName in build.gradle
sed -i "s/versionCode [0-9]\+/versionCode ${NEW_VERSION_CODE}/" app/build.gradle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
echo "NEW_VERSION_NAME=${new_version}" >> $GITHUB_ENV
echo "NEW_VERSION_CODE=${version_code}" >> $GITHUB_ENV

- name: Update build.gradle with new version code and version name
- name: Update build.gradle.kts with new version code and version name
run: |
# Update versionCode and versionName in build.gradle
sed -i "s/versionCode [0-9]\+/versionCode ${NEW_VERSION_CODE}/" app/build.gradle
Expand Down
104 changes: 0 additions & 104 deletions app/build.gradle

This file was deleted.

118 changes: 118 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.devtools.ksp)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.compose.compiler)
}

android {
compileSdk = 36
namespace = "com.github.capntrips.kernelflasher"

defaultConfig {
applicationId = "com.github.capntrips.kernelflasher"
minSdk = 29
targetSdk = 36
versionCode = 10600
versionName = "1.6.0"

javaCompileOptions {
annotationProcessorOptions {
arguments += mapOf(
"room.schemaLocation" to "$projectDir/schemas",
"room.incremental" to "true",
)
}
}

ndk {
//noinspection ChromeOsAbiSupport
abiFilters.add("arm64-v8a")
}

vectorDrawables {
useSupportLibrary = true
}
}

buildTypes {
release {
isMinifyEnabled = false
isShrinkResources = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
}
}

sourceSets {
getByName("main") {
jniLibs.srcDirs("src/main/jniLibs")
}
}

buildFeatures {
buildConfig = true
aidl = true
compose = true
}

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

kotlin {
jvmToolchain(21)

}

packaging {
resources {
excludes += setOf("/META-INF/{AL2.0,LGPL2.1}")
}
jniLibs {
useLegacyPackaging = true
}
dex {
useLegacyPackaging = true
}
}

androidResources {
generateLocaleConfig = true
}

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

dependencies {
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.compose.material)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.core.splashscreen)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.room.runtime)
annotationProcessor(libs.androidx.room.compiler)
ksp(libs.androidx.room.compiler)
implementation(libs.libsu.core)
implementation(libs.libsu.io)
implementation(libs.libsu.nio)
implementation(libs.libsu.service)
implementation(libs.material)
implementation(libs.okhttp)
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.serialization.json)
implementation(libs.retrofit)
implementation(libs.converter.gson)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "bbe3033de836fa33fb2ed46b5272124e",
"entities": [
{
"tableName": "Update",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER, `update_uri` TEXT, `kernel_name` TEXT NOT NULL, `kernel_version` TEXT NOT NULL, `kernel_link` TEXT NOT NULL, `kernel_changelog_url` TEXT NOT NULL, `kernel_date` INTEGER NOT NULL, `kernel_sha1` TEXT NOT NULL, `support_link` TEXT, `last_updated` INTEGER, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER"
},
{
"fieldPath": "updateUri",
"columnName": "update_uri",
"affinity": "TEXT"
},
{
"fieldPath": "kernelName",
"columnName": "kernel_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "kernelVersion",
"columnName": "kernel_version",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "kernelLink",
"columnName": "kernel_link",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "kernelChangelogUrl",
"columnName": "kernel_changelog_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "kernelDate",
"columnName": "kernel_date",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "kernelSha1",
"columnName": "kernel_sha1",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "supportLink",
"columnName": "support_link",
"affinity": "TEXT"
},
{
"fieldPath": "lastUpdated",
"columnName": "last_updated",
"affinity": "INTEGER"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
}
}
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'bbe3033de836fa33fb2ed46b5272124e')"
]
}
}
6 changes: 3 additions & 3 deletions build.gradle → build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ plugins {
alias(libs.plugins.devtools.ksp) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.compose.compiler) apply false
// alias(libs.plugins.compose.compiler) apply false
}

tasks.register('clean', Delete) {
delete rootProject.buildDir
tasks.register("clean", Delete::class) {
delete(rootProject.layout.buildDirectory)
}
Loading