Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade gradle #1866

Merged
merged 3 commits into from
Jul 8, 2024
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
3 changes: 3 additions & 0 deletions manager/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ android {
aidl = true
buildConfig = true
compose = true
prefab = true
}

kotlinOptions {
Expand Down Expand Up @@ -113,4 +114,6 @@ dependencies {

implementation(libs.markdown)
implementation(libs.androidx.webkit)

implementation(libs.lsposed.cxx)
}
3 changes: 3 additions & 0 deletions manager/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ cmake_minimum_required(VERSION 3.18.1)

project("kernelsu")

find_package(cxx REQUIRED CONFIG)
link_libraries(cxx::cxx)

add_library(kernelsu
SHARED
jni.cc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ private fun InfoCard() {
}

fun getManagerVersion(context: Context): Pair<String, Int> {
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
return Pair(packageInfo.versionName, packageInfo.versionCode)
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)!!
return Pair(packageInfo.versionName!!, packageInfo.versionCode)
}

@Preview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SuperUserViewModel : ViewModel() {
val packageName: String
get() = packageInfo.packageName
val uid: Int
get() = packageInfo.applicationInfo.uid
get() = packageInfo.applicationInfo!!.uid

val allowSu: Boolean
get() = profile != null && profile.allowSu
Expand Down Expand Up @@ -90,7 +90,7 @@ class SuperUserViewModel : ViewModel() {
.toPinyinString(it.label).contains(search, true)
}.filter {
it.uid == 2000 // Always show shell
|| showSystemApps || it.packageInfo.applicationInfo.flags.and(ApplicationInfo.FLAG_SYSTEM) == 0
|| showSystemApps || it.packageInfo.applicationInfo!!.flags.and(ApplicationInfo.FLAG_SYSTEM) == 0
}
}

Expand Down Expand Up @@ -146,7 +146,7 @@ class SuperUserViewModel : ViewModel() {

apps = packages.map {
val appInfo = it.applicationInfo
val uid = appInfo.uid
val uid = appInfo!!.uid
val profile = Natives.getAppProfile(it.packageName, uid)
AppInfo(
label = appInfo.loadLabel(pm).toString(),
Expand Down
20 changes: 7 additions & 13 deletions manager/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,23 @@ cmaker {
default {
arguments.addAll(
arrayOf(
"-DANDROID_STL=c++_static",
"-DANDROID_STL=none",
)
)
val flags = arrayOf(
"-Wno-gnu-string-literal-operator-template",
"-Wno-c++2b-extensions",
)
cFlags.addAll(flags)
cppFlags.addAll(flags)
abiFilters("arm64-v8a", "x86_64")
abiFilters("arm64-v8a", "x86_64", "riscv64")
}
buildTypes {
if (it.name == "release") {
arguments += "-DDEBUG_SYMBOLS_PATH=${buildDir.absolutePath}/symbols"
arguments += "-DDEBUG_SYMBOLS_PATH=${layout.buildDirectory.asFile.get().absolutePath}/symbols"
}
}
}

val androidMinSdkVersion = 26
val androidTargetSdkVersion = 34
val androidCompileSdkVersion = 34
val androidBuildToolsVersion = "34.0.0"
val androidCompileNdkVersion = "26.3.11579264"
val androidTargetSdkVersion = 35
val androidCompileSdkVersion = 35
val androidBuildToolsVersion = "35.0.0"
val androidCompileNdkVersion = "27.0.11718014-beta1"
val androidSourceCompatibility = JavaVersion.VERSION_21
val androidTargetCompatibility = JavaVersion.VERSION_21
val managerVersionCode by extra(getVersionCode())
Expand Down
4 changes: 3 additions & 1 deletion manager/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,6 @@ sheet-compose-dialogs-core = { group = "com.maxkeppeler.sheets-compose-dialogs",
sheet-compose-dialogs-list = { group = "com.maxkeppeler.sheets-compose-dialogs", name = "list", version.ref = "sheets-compose-dialogs" }
sheet-compose-dialogs-input = { group = "com.maxkeppeler.sheets-compose-dialogs", name = "input", version.ref = "sheets-compose-dialogs" }

markdown = { group = "io.noties.markwon", name = "core", version.ref = "markdown" }
markdown = { group = "io.noties.markwon", name = "core", version.ref = "markdown" }

lsposed-cxx = { module = "org.lsposed.libcxx:libcxx", version = "27.0.11718014-beta1" }
2 changes: 1 addition & 1 deletion manager/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion manager/gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
#
Expand Down Expand Up @@ -54,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
Loading