- Rebrand to me.pawlet.updater package - Replace ro.lineage.* props with ro.pawlet.* equivalents - Use ro.product.device for device name lookup - Set server URL to https://updates.pawlet.me/api/v1/{device}/ - Bump compileSdk/targetSdk to 36 (Android 16) - Drop all locale translations (English-only for now) - Add NOTICE.txt crediting upstream LineageOS team - Remove old org.lineageos.updater.xml privapp files - UpdaterReceiver: add missing Utils import - Remove setPerformanceMode chain (UpdateEngine API removed in Android 16)
119 lines
3.3 KiB
Kotlin
119 lines
3.3 KiB
Kotlin
/*
|
|
* SPDX-FileCopyrightText: oxmc / PawletOS
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import java.util.Properties
|
|
import org.lineageos.generatebp.GenerateBpPlugin
|
|
import org.lineageos.generatebp.GenerateBpPluginExtension
|
|
import org.lineageos.generatebp.models.Module
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("kotlin-android")
|
|
}
|
|
|
|
apply {
|
|
plugin<GenerateBpPlugin>()
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.2/.m2")
|
|
}
|
|
|
|
dependencies {
|
|
classpath("org.lineageos:gradle-generatebp:+")
|
|
}
|
|
}
|
|
|
|
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
val keystoreProperties = Properties().apply {
|
|
if (keystorePropertiesFile.exists()) {
|
|
load(keystorePropertiesFile.inputStream())
|
|
}
|
|
}
|
|
|
|
android {
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "me.pawlet.updater"
|
|
minSdk = 32
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
}
|
|
|
|
buildTypes {
|
|
getByName("release") {
|
|
// Includes the default ProGuard rules files.
|
|
setProguardFiles(
|
|
listOf(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
)
|
|
}
|
|
getByName("debug") {
|
|
// Append .dev to package name so we won't conflict with AOSP build.
|
|
applicationIdSuffix = ".dev"
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
(keystoreProperties["keyAlias"] as String?)?.let {
|
|
keyAlias = it
|
|
}
|
|
(keystoreProperties["keyPassword"] as String?)?.let {
|
|
keyPassword = it
|
|
}
|
|
(keystoreProperties["storeFile"] as String?)?.let {
|
|
storeFile = file(it)
|
|
}
|
|
(keystoreProperties["storePassword"] as String?)?.let {
|
|
storePassword = it
|
|
}
|
|
}
|
|
}
|
|
namespace = "me.pawlet.updater"
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly(fileTree(mapOf("dir" to "../system_libs", "include" to listOf("*.jar"))))
|
|
|
|
implementation("androidx.core:core-ktx:1.9.0")
|
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
|
implementation("androidx.cardview:cardview:1.0.0")
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
|
|
implementation("androidx.localbroadcastmanager:localbroadcastmanager:1.1.0")
|
|
implementation("androidx.preference:preference:1.2.0")
|
|
implementation("androidx.recyclerview:recyclerview:1.2.1")
|
|
implementation("com.google.android.material:material:1.9.0-alpha01")
|
|
}
|
|
|
|
configure<GenerateBpPluginExtension> {
|
|
targetSdk.set(android.defaultConfig.targetSdk!!)
|
|
availableInAOSP.set { module: Module ->
|
|
when {
|
|
module.group.startsWith("androidx") -> true
|
|
module.group.startsWith("org.jetbrains") -> true
|
|
module.group == "com.google.android.material" -> true
|
|
module.group == "com.google.errorprone" -> true
|
|
module.group == "com.google.guava" -> true
|
|
module.group == "junit" -> true
|
|
else -> false
|
|
}
|
|
}
|
|
}
|