Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/buildCi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.6'
cmake-version: '4.0.2'

- name: Setup Ninja
run: sudo apt-get install ninja-build
Expand All @@ -33,7 +33,7 @@ jobs:

- uses: nttld/setup-ndk@v1
with:
ndk-version: r28
ndk-version: r28b

- name: Get Commit Message
id: commitMessage
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:

- name: Sign artifact
id: signArtifact
uses: ilharp/sign-android-release@v1.0.4
uses: ilharp/sign-android-release@v2
with:
releaseDir: app/build/outputs/apk/debug
keyAlias: ${{ secrets.KEYALIAS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildPro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.6'
cmake-version: '4.0.2'

- name: Setup Ninja
run: sudo apt-get install ninja-build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/buildRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.6'
cmake-version: '4.0.2'

- name: Setup Ninja
run: sudo apt-get install ninja-build
Expand All @@ -35,7 +35,7 @@ jobs:

- uses: nttld/setup-ndk@v1
with:
ndk-version: r28
ndk-version: r28b

- name: Get Commit Message
id: commitMessage
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:

- name: Sign artifact
id: signArtifact
uses: ilharp/sign-android-release@v1
uses: ilharp/sign-android-release@v2
with:
releaseDir: app/build/outputs/apk/release
keyAlias: ${{ secrets.KEYALIAS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deployToGoogle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- uses: nttld/setup-ndk@v1
with:
ndk-version: r28
ndk-version: r28b

- name: Setup JDK
uses: actions/setup-java@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.6'
cmake-version: '4.0.2'

- name: Setup Ninja
run: sudo apt-get install ninja-build
Expand All @@ -34,7 +34,7 @@ jobs:

- uses: nttld/setup-ndk@v1
with:
ndk-version: r28
ndk-version: r28b

- name: Setup JDK
uses: actions/setup-java@v4
Expand Down
6 changes: 6 additions & 0 deletions .idea/AndroidProjectSystem.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/deviceManager.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 15 additions & 13 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@file:Suppress("SpellCheckingInspection", "UnstableApiUsage")

import org.jetbrains.kotlin.gradle.dsl.JvmTarget


plugins {
id("com.android.application")
kotlin("android")
Expand All @@ -12,6 +15,7 @@ plugins {
android {
compileSdk = 36
buildToolsVersion = "36.0.0"
ndkVersion = "28.1.13356709"
buildFeatures.dataBinding = true
buildFeatures.viewBinding = true
buildFeatures.buildConfig = true
Expand All @@ -22,7 +26,7 @@ android {
applicationId = "de.dertyp7214.rboardthememanager"
minSdk = 31
targetSdk = 36
versionCode = 395000
versionCode = 395005
versionName = "3.9.5"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -53,18 +57,16 @@ android {
applicationIdSuffix = ".debug"
}
}
compileOptions {
sourceCompatibility = JavaVersion.current()
targetCompatibility = JavaVersion.current()
}

kotlinOptions {
jvmTarget = JavaVersion.current().toString()
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true",
"-Xsuppress-version-warnings"
)
kotlin {
compilerOptions {
freeCompilerArgs = freeCompilerArgs.get() + listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true",
"-Xsuppress-version-warnings"
)
jvmToolchain(23)
jvmTarget.set(JvmTarget.JVM_23)
}
}
packaging {
jniLibs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class Application : Application() {
.edit { putString("logMode", if (BuildConfig.DEBUG) "VERBOSE" else "ERROR") }
Logger.init(
this,
getAttr(com.google.android.material.R.attr.colorPrimary),
getAttr(com.google.android.material.R.attr.colorAccent)
getAttr(R.attr.colorPrimary),
getAttr(R.attr.colorAccent)
)
Logger.extraData = {
StringBuilder("Rooted: ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ThemeAdapter(
)!!.toBitmap()
}
private val selectedBackground by lazy {
context.getAttr(com.google.android.material.R.attr.colorBackgroundFloating).toDrawable().apply {
context.getAttr(R.attr.colorBackgroundFloating).toDrawable().apply {
alpha = 187
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class NewsCards(context: Context, attrs: AttributeSet? = null) : LinearLayout(co

private fun fetchNewsFeed(): List<CardElement> {
return try {
Gson().fromJson<List<CardElement>?>(
Gson().fromJson<List<CardElement>>(
URL(newsFeedUrl).readText(),
TypeTokens<List<CardElement>>()
).filter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package de.dertyp7214.rboardthememanager.data
import androidx.annotation.DrawableRes
import androidx.annotation.StringRes

data class MenuItem(@DrawableRes val icon: Int, @StringRes val title: Int, val onClick: () -> Unit)
data class MenuItem(@param:DrawableRes val icon: Int, @param:StringRes val title: Int, val onClick: () -> Unit)
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ class ThemeListFragment : Fragment() {
0,
5.dpToPx(requireContext()).toInt()
)
refreshLayout.setProgressBackgroundColorSchemeColor(requireActivity().getAttr(com.google.android.material.R.attr.colorBackgroundFloating))
refreshLayout.setProgressBackgroundColorSchemeColor(requireActivity().getAttr(R.attr.colorBackgroundFloating))
refreshLayout.setColorSchemeColors(
requireActivity().getAttr(com.google.android.material.R.attr.colorPrimary),
requireActivity().getAttr(R.attr.colorPrimary),
requireActivity().getAttr(
com.google.android.material.R.attr.colorTertiary
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ class Flags(val activity: Activity, private val args: SafeJSON) : AbstractPrefer

enum class FLAGS(
val key: String,
@StringRes val title: Int,
@StringRes val summary: Int,
@DrawableRes val icon: Int,
@param:StringRes val title: Int,
@param:StringRes val summary: Int,
@param:DrawableRes val icon: Int,
val defaultValue: Any,
val type: TYPE,
val file: FILES = FILES.NONE,
Expand Down Expand Up @@ -142,9 +142,9 @@ class Flags(val activity: Activity, private val args: SafeJSON) : AbstractPrefer

data class FlagItem(
val key: String,
@StringRes val title: Int,
@StringRes val summary: Int,
@DrawableRes val icon: Int,
@param:StringRes val title: Int,
@param:StringRes val summary: Int,
@param:DrawableRes val icon: Int,
val defaultValue: Any,
val type: TYPE,
val file: FILES = FILES.NONE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,18 +245,19 @@ class Preferences(
titleRes = R.string.theme_path
summary = infoData[key] as String
iconRes = R.drawable.ic_folder_open
onClick {
Intent(ACTION_GET_CONTENT).apply {
setDataAndType(Uri.fromFile(File(infoData[key] as String)), "application/*")
activity.startActivity(this)
}
true
}
}
pref("installation_method") {
titleRes = R.string.installation_method
summaryRes = infoData[key] as Int
iconRes = R.drawable.ic_download
if (!Config.useMagisk){
onClick {
activity.packageManager.getLaunchIntentForPackage(
Config.GBOARD_PACKAGE_NAME
)?.let(activity::startActivity)
false
}
}
}
pref("rboard_app_version") {
titleRes = R.string.rboard_app_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class Props(private val activity: AppCompatActivity, private val args: SafeJSON)
enum class PROPS(
val key: String,
val title: String,
@StringRes val summary: Int,
@DrawableRes val icon: Int,
@param:StringRes val summary: Int,
@param:DrawableRes val icon: Int,
val defaultValue: Any,
val type: TYPE,
val visible: Boolean = true,
Expand All @@ -60,8 +60,8 @@ class Props(private val activity: AppCompatActivity, private val args: SafeJSON)
data class PropItem(
val key: String,
val title: String,
@StringRes val summary: Int,
@DrawableRes val icon: Int,
@param:StringRes val summary: Int,
@param:DrawableRes val icon: Int,
val defaultValue: Any,
val type: TYPE,
val visible: Boolean = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ class Settings(private val activity: Activity, private val args: SafeJSON) : Abs

enum class SETTINGS(
val key: String,
@StringRes val title: Int,
@StringRes val summary: Int,
@DrawableRes val icon: Int,
@param:StringRes val title: Int,
@param:StringRes val summary: Int,
@param:DrawableRes val icon: Int,
val defaultValue: Any,
val type: TYPE,
val items: List<SelectionItem> = listOf(),
Expand Down Expand Up @@ -316,7 +316,10 @@ class Settings(private val activity: Activity, private val args: SafeJSON) : Abs
}

override fun preferences(builder: PreferenceScreen.Builder) {
SETTINGS.entries.filter { it.visible }.forEach { item ->
SETTINGS.entries.filter { it.visible }
.filter {
it != SETTINGS.USE_MAGISK && it != SETTINGS.UNINSTALL
}.forEach { item ->
val pref: Preference = when (item.type) {
TYPE.BOOLEAN -> builder.switch(item.key) {
defaultValue = item.defaultValue as Boolean
Expand Down
Loading
Loading