Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkaW committed Jul 9, 2023
1 parent 4568061 commit d63268e
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 63 deletions.
59 changes: 25 additions & 34 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false
alias libs.plugins.refine apply false
}

apply plugin: 'idea'

idea.module {
Expand All @@ -6,51 +13,35 @@ idea.module {
resourceDirs += file('scripts')
}

buildscript {
apply from: 'api/manifest.gradle'

ext.kotlinVersion = '1.7.20'
repositories {
mavenCentral()
google()
subprojects {
plugins.withId("com.android.base") {
plugins.apply('dev.rikka.tools.refine')

// In case newly published library not yet synced with maven central
maven {
url("https://s01.oss.sonatype.org/content/repositories/releases/")
content {
includeGroup("dev.rikka.tools.refine")
android {
compileSdk = 33
defaultConfig {
minSdk = 23
targetSdk = 33
}
}
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'dev.rikka.tools.refine:gradle-plugin:3.1.1'
}
}

allprojects {
repositories {
mavenCentral()
google()

// In case newly published library not yet synced with maven central
maven {
url("https://s01.oss.sonatype.org/content/repositories/releases/")
content {
includeGroupByRegex("dev.rikka.*")
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildFeatures {
aidl true
}
}
mavenLocal()
}
}

task clean(type: Delete) {

tasks.register('clean', Delete) {
delete rootProject.buildDir
}

ext {
minSdkVersion = 23
targetSdkVersion = 33
api_min_sdk = 23
api_target_sdk = 33
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ android.enableParallelJsonGen=true
android.enableNewResourceShrinker=true
#android.experimental.enableNewResourceShrinker.preciseShrinking=true
android.enableR8.fullMode=false
android.nonTransitiveRClass=false
android.nonFinalResIds=false
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Aug 25 15:19:34 CST 2021
#Mon Jul 10 01:01:45 CST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 8 additions & 11 deletions module/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ plugins {
apply from: file(rootProject.file('module.gradle'))

android {
compileSdkVersion rootProject.ext.targetSdkVersion
namespace "rikka.sui"
compileSdk rootProject.ext.targetSdkVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
Expand All @@ -31,6 +32,7 @@ android {
}
buildTypes {
debug {
defaultConfig.minSdk 24
multiDexEnabled false
}
release {
Expand Down Expand Up @@ -65,10 +67,6 @@ android {
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
checkReleaseBuilds false
}
Expand All @@ -78,7 +76,7 @@ android {
}

dependencies {
implementation 'dev.rikka.tools.refine:runtime:3.1.1'
implementation libs.refine.runtime

implementation 'dev.rikka.ndk:riru:26.0.0'
implementation 'dev.rikka.ndk.thirdparty:cxx:1.2.0'
Expand All @@ -94,9 +92,8 @@ dependencies {
implementation project(':rish')
implementation project(':server-shared')

def hiddenApiVersion = '3.4.2'
implementation "dev.rikka.hidden:compat:$hiddenApiVersion"
compileOnly "dev.rikka.hidden:stub:$hiddenApiVersion"
implementation libs.hidden.compat
compileOnly libs.hidden.stub
}

def outDir = file("$rootDir/out")
Expand Down Expand Up @@ -208,8 +205,8 @@ afterEvaluate {
task("zip${variantCapped}", type: Zip) {
dependsOn("prepareMagiskFiles${variantCapped}")
from magiskDir
archiveName zipName
destinationDir outDir
archiveFileName = zipName
destinationDirectory = outDir
}

task("push${variantCapped}", type: Exec) {
Expand Down
1 change: 1 addition & 0 deletions module/src/main/java/rikka/sui/server/SuiService.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import static rikka.shizuku.ShizukuApiConstants.ATTACH_APPLICATION_API_VERSION;
import static rikka.shizuku.ShizukuApiConstants.ATTACH_APPLICATION_PACKAGE_NAME;
import static rikka.shizuku.ShizukuApiConstants.BIND_APPLICATION_PERMISSION_GRANTED;
import static rikka.shizuku.ShizukuApiConstants.BIND_APPLICATION_SERVER_PATCH_VERSION;
import static rikka.shizuku.ShizukuApiConstants.BIND_APPLICATION_SERVER_SECONTEXT;
import static rikka.shizuku.ShizukuApiConstants.BIND_APPLICATION_SERVER_UID;
import static rikka.shizuku.ShizukuApiConstants.BIND_APPLICATION_SERVER_VERSION;
Expand Down
30 changes: 30 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
mavenLocal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
mavenLocal()
}
versionCatalogs {
libs {
version('hidden-api', '4.1.0')
library('hidden-compat', 'dev.rikka.hidden', 'compat').versionRef('hidden-api')
library('hidden-stub', 'dev.rikka.hidden', 'stub').versionRef('hidden-api')

version('refine', '4.3.0')
library('refine-runtime', 'dev.rikka.tools.refine', 'runtime').versionRef('refine')
library('refine-annotation', 'dev.rikka.tools.refine', 'annotation').versionRef('refine')
library('refine-annotation-processor', 'dev.rikka.tools.refine', 'annotation-processor').versionRef('refine')
plugin('refine', 'dev.rikka.tools.refine').versionRef('refine')
}
}
}

include ':module', ':ui'

import org.apache.tools.ant.DirectoryScanner
Expand Down
19 changes: 7 additions & 12 deletions ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ plugins {
apply from: file(rootProject.file('module.gradle'))

android {
compileSdkVersion rootProject.ext.targetSdkVersion
namespace "rikka.sui"
compileSdk rootProject.ext.targetSdkVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
Expand All @@ -20,20 +21,18 @@ android {
}
buildFeatures {
viewBinding true
buildConfig true
}
buildTypes {
debug {
defaultConfig.minSdk 24
multiDexEnabled false
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude '/META-INF/*.version'
exclude '/META-INF/*.kotlin_module'
Expand All @@ -48,23 +47,19 @@ android {
}
}

configurations.all {
configurations.configureEach {
exclude group: 'androidx.appcompat', module: 'appcompat'
}

repositories {
mavenLocal()
}

dependencies {
implementation("dev.rikka.tools.refine:runtime:3.1.1")
implementation libs.refine.runtime

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1"

implementation project(':aidl')
implementation project(':api')
compileOnly 'dev.rikka.hidden:stub:2.3.1'
compileOnly libs.hidden.stub
implementation 'dev.rikka.rikkax.parcelablelist:parcelablelist:2.0.0'

implementation 'dev.rikka.rikkax.appcompat:appcompat:1.2.0-rc01'
Expand Down
2 changes: 1 addition & 1 deletion ui/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="rikka.sui" />
<manifest />
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ManagementAppItemViewHolder(private val binding: ManagementAppItemBinding)
val context = binding.root.context
val theme = context.theme
val isNight = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_YES != 0
val colorAccent = theme.resolveColor(R.attr.colorAccent)
val colorAccent = theme.resolveColor(androidx.appcompat.R.attr.colorAccent)
val colorForeground = theme.resolveColor(android.R.attr.colorForeground)
val textColorTertiary = theme.resolveColorStateList(android.R.attr.textColorTertiary)
val colorError = if (isNight) 0xFF8A80 else 0xFF5252
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ManagementFragment : AppFragment() {
setColorSchemeColors(
context.theme.resolveColor(android.R.attr.colorAccent)
)
val actionBarSize = context.theme.resolveDimension(R.attr.actionBarSize, 0f).toInt()
val actionBarSize = context.theme.resolveDimension(androidx.appcompat.R.attr.actionBarSize, 0f).toInt()
setProgressViewOffset(false, actionBarSize, (64 * resources.displayMetrics.density + actionBarSize).toInt())
}

Expand Down

0 comments on commit d63268e

Please sign in to comment.