Skip to content

Commit

Permalink
fix: HookLauncher & try target 34
Browse files Browse the repository at this point in the history
  • Loading branch information
duzhaokun123 committed Dec 24, 2023
1 parent 4951ea1 commit 5ac764d
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 18 deletions.
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

3 changes: 2 additions & 1 deletion .idea/misc.xml

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![GitHub license](https://img.shields.io/github/license/duzhaokun123/YAMF?style=flat-square)](https://github.com/duzhaokun123/YAFM/blob/main/LICENSE)
![Android SDK min 31](https://img.shields.io/badge/Android%20SDK-%3E%3D%2031-brightgreen?style=flat-square&logo=android)
![Android SDK target 33](https://img.shields.io/badge/Android%20SDK-target%2033-brightgreen?style=flat-square&logo=android)
![Android SDK target 34](https://img.shields.io/badge/Android%20SDK-target%2034-brightgreen?style=flat-square&logo=android)
![Xposed Module](https://img.shields.io/badge/Xposed-Module-blue?style=flat-square)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram&style=flat-square)](https://t.me/YAMF_channel)

Expand Down
2 changes: 1 addition & 1 deletion android-stub/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ android {
dependencies {
annotationProcessor("dev.rikka.tools.refine:annotation-processor:4.3.0")
compileOnly("dev.rikka.tools.refine:annotation:4.3.0")
compileOnly("androidx.annotation:annotation:1.6.0")
compileOnly("androidx.annotation:annotation:1.7.1")
compileOnly("dev.rikka.hidden:stub:4.2.0")
}
15 changes: 7 additions & 8 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import java.io.ByteArrayOutputStream
import java.nio.file.Paths

val localProperties = gradleLocalProperties(rootDir)

Expand All @@ -15,12 +14,12 @@ android {
val buildTime = System.currentTimeMillis()
val baseVersionName = "0.7"

compileSdk = 33
compileSdk = 34

defaultConfig {
applicationId = "io.github.duzhaokun123.yamf"
minSdk = 31
targetSdk = 33
targetSdk = 34
versionCode = 7
versionName = "$baseVersionName-git.$gitHash${if (isDirty) "-dirty" else ""}"

Expand Down Expand Up @@ -98,11 +97,11 @@ android {
}

dependencies {
implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.activity:activity-ktx:1.7.2")
implementation("androidx.fragment:fragment-ktx:1.6.1")
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.activity:activity-ktx:1.8.2")
implementation("androidx.fragment:fragment-ktx:1.6.2")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.wear:wear:1.3.0")
implementation("androidx.preference:preference-ktx:1.2.1")
Expand All @@ -121,7 +120,7 @@ dependencies {
compileOnly("de.robv.android.xposed:api:82")

//lifecycle
val lifecycleVersion = "2.6.1"
val lifecycleVersion = "2.6.2"
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,22 @@ fun StartCmd.startAuto(displayId: Int) {
return null
}

fun Context.registerReceiver(action: String, onReceive: BroadcastReceiver.(Context, Intent) -> Unit) =
registerReceiver(object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
onReceive(this, context, intent)
}
}, android.content.IntentFilter(action))
fun Context.registerReceiver(action: String, onReceive: BroadcastReceiver.(Context, Intent) -> Unit) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
registerReceiver(object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
onReceive(this, context, intent)
}
}, android.content.IntentFilter(action), Context.RECEIVER_EXPORTED)
} else {
registerReceiver(object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
onReceive(this, context, intent)
}
}, android.content.IntentFilter(action))
}
}


val ActivityInfo.componentName: ComponentName
get() = ComponentName(packageName, name)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.1.0")
classpath("com.android.tools.build:gradle:8.1.4")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0")
classpath(kotlin("gradle-plugin"))

Expand Down

0 comments on commit 5ac764d

Please sign in to comment.