mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 01:35:17 +08:00
Compare commits
4 Commits
61c0c5960b
...
e1544a8ae3
Author | SHA1 | Date | |
---|---|---|---|
e1544a8ae3
|
|||
276503ccf4
|
|||
36bb1bf108
|
|||
edb22f1bd3
|
2
.idea/kotlinc.xml
generated
2
.idea/kotlinc.xml
generated
@@ -7,6 +7,6 @@
|
|||||||
<option name="additionalArguments" value="-version -Xopt-in=kotlin.RequiresOptIn" />
|
<option name="additionalArguments" value="-version -Xopt-in=kotlin.RequiresOptIn" />
|
||||||
</component>
|
</component>
|
||||||
<component name="KotlinJpsPluginSettings">
|
<component name="KotlinJpsPluginSettings">
|
||||||
<option name="version" value="2.1.10" />
|
<option name="version" value="2.2.10" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@@ -1,7 +1,23 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
autowire(libs.plugins.android.application) apply false
|
autowire(libs.plugins.android.application) apply false
|
||||||
autowire(libs.plugins.android.library) apply false
|
autowire(libs.plugins.android.library) apply false
|
||||||
autowire(libs.plugins.kotlin.jvm) apply false
|
autowire(libs.plugins.kotlin.jvm) apply false
|
||||||
autowire(libs.plugins.kotlin.android) apply false
|
autowire(libs.plugins.kotlin.android) apply false
|
||||||
autowire(libs.plugins.kotlin.ksp) apply false
|
autowire(libs.plugins.kotlin.ksp) apply false
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
tasks.withType<KotlinJvmCompile>().configureEach {
|
||||||
|
compilerOptions {
|
||||||
|
jvmTarget = JvmTarget.JVM_17
|
||||||
|
freeCompilerArgs.addAll(
|
||||||
|
"-Xno-param-assertions",
|
||||||
|
"-Xno-call-assertions",
|
||||||
|
"-Xno-receiver-assertions"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@@ -3,7 +3,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
kotlin.incremental.useClasspathSnapshot=true
|
|
||||||
# Project Configuration
|
# Project Configuration
|
||||||
project.name=YukiHookAPI
|
project.name=YukiHookAPI
|
||||||
project.url=https://github.com/HighCapable/YukiHookAPI
|
project.url=https://github.com/HighCapable/YukiHookAPI
|
||||||
@@ -12,9 +11,9 @@ project.yukihookapi-core.moduleName=api
|
|||||||
project.yukihookapi-core.version="1.3.0"
|
project.yukihookapi-core.version="1.3.0"
|
||||||
project.yukihookapi-ksp-xposed.moduleName=ksp-xposed
|
project.yukihookapi-ksp-xposed.moduleName=ksp-xposed
|
||||||
project.yukihookapi-ksp-xposed.version=${project.yukihookapi-core.version}
|
project.yukihookapi-ksp-xposed.version=${project.yukihookapi-core.version}
|
||||||
project.android.compileSdk=35
|
project.android.compileSdk=36
|
||||||
project.android.minSdk=21
|
project.android.minSdk=21
|
||||||
project.android.targetSdk=35
|
project.android.targetSdk=36
|
||||||
project.samples-demo-app.packageName=${project.groupName}.demo_app
|
project.samples-demo-app.packageName=${project.groupName}.demo_app
|
||||||
project.samples-demo-app.versionName=universal
|
project.samples-demo-app.versionName=universal
|
||||||
project.samples-demo-app.versionCode=1
|
project.samples-demo-app.versionCode=1
|
||||||
|
@@ -19,16 +19,16 @@ repositories:
|
|||||||
plugins:
|
plugins:
|
||||||
org.jetbrains.kotlin.jvm:
|
org.jetbrains.kotlin.jvm:
|
||||||
alias: kotlin-jvm
|
alias: kotlin-jvm
|
||||||
version: 2.1.10
|
version: 2.2.10
|
||||||
org.jetbrains.kotlin.android:
|
org.jetbrains.kotlin.android:
|
||||||
alias: kotlin-android
|
alias: kotlin-android
|
||||||
version-ref: kotlin-jvm
|
version-ref: kotlin-jvm
|
||||||
com.google.devtools.ksp:
|
com.google.devtools.ksp:
|
||||||
alias: kotlin-ksp
|
alias: kotlin-ksp
|
||||||
version: 2.1.10-1.0.31
|
version: 2.2.10-2.0.2
|
||||||
com.android.application:
|
com.android.application:
|
||||||
alias: android-application
|
alias: android-application
|
||||||
version: 8.9.3
|
version: 8.12.1
|
||||||
com.android.library:
|
com.android.library:
|
||||||
alias: android-library
|
alias: android-library
|
||||||
version-ref: android-application
|
version-ref: android-application
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
@@ -26,14 +26,6 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "17"
|
|
||||||
freeCompilerArgs = listOf(
|
|
||||||
"-Xno-param-assertions",
|
|
||||||
"-Xno-call-assertions",
|
|
||||||
"-Xno-receiver-assertions"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
buildConfig = true
|
buildConfig = true
|
||||||
viewBinding = true
|
viewBinding = true
|
||||||
|
@@ -26,14 +26,6 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "17"
|
|
||||||
freeCompilerArgs = listOf(
|
|
||||||
"-Xno-param-assertions",
|
|
||||||
"-Xno-call-assertions",
|
|
||||||
"-Xno-receiver-assertions"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
buildConfig = true
|
buildConfig = true
|
||||||
viewBinding = true
|
viewBinding = true
|
||||||
|
@@ -8,7 +8,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
plugins {
|
plugins {
|
||||||
id("com.highcapable.sweetdependency") version "1.0.4"
|
id("com.highcapable.sweetdependency") version "1.0.4"
|
||||||
id("com.highcapable.sweetproperty") version "1.0.5"
|
id("com.highcapable.sweetproperty") version "1.0.8"
|
||||||
}
|
}
|
||||||
sweetProperty {
|
sweetProperty {
|
||||||
global {
|
global {
|
||||||
|
@@ -27,14 +27,6 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "17"
|
|
||||||
freeCompilerArgs = listOf(
|
|
||||||
"-Xno-param-assertions",
|
|
||||||
"-Xno-call-assertions",
|
|
||||||
"-Xno-receiver-assertions"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
lint { checkReleaseBuilds = false }
|
lint { checkReleaseBuilds = false }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@ import android.os.Handler
|
|||||||
import android.os.UserHandle
|
import android.os.UserHandle
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import com.highcapable.betterandroid.system.extension.component.registerReceiver
|
import com.highcapable.betterandroid.system.extension.component.registerReceiver
|
||||||
import com.highcapable.betterandroid.system.extension.tool.SystemVersion
|
import com.highcapable.betterandroid.system.extension.tool.AndroidVersion
|
||||||
import com.highcapable.kavaref.KavaRef.Companion.asResolver
|
import com.highcapable.kavaref.KavaRef.Companion.asResolver
|
||||||
import com.highcapable.kavaref.KavaRef.Companion.resolve
|
import com.highcapable.kavaref.KavaRef.Companion.resolve
|
||||||
import com.highcapable.kavaref.extension.classOf
|
import com.highcapable.kavaref.extension.classOf
|
||||||
@@ -420,13 +420,13 @@ internal object AppParasitics {
|
|||||||
* @param context 当前 [Context]
|
* @param context 当前 [Context]
|
||||||
* @param proxy 代理的 [Activity]
|
* @param proxy 代理的 [Activity]
|
||||||
*/
|
*/
|
||||||
@RequiresApi(SystemVersion.N)
|
@RequiresApi(AndroidVersion.N)
|
||||||
internal fun registerModuleAppActivities(context: Context, proxy: Any?) {
|
internal fun registerModuleAppActivities(context: Context, proxy: Any?) {
|
||||||
if (isActivityProxyRegistered) return
|
if (isActivityProxyRegistered) return
|
||||||
if (YukiXposedModule.isXposedEnvironment.not()) return YLog.innerW("You can only register Activity Proxy in Xposed Environment")
|
if (YukiXposedModule.isXposedEnvironment.not()) return YLog.innerW("You can only register Activity Proxy in Xposed Environment")
|
||||||
if (context.packageName == YukiXposedModule.modulePackageName) return YLog.innerE("You cannot register Activity Proxy into yourself")
|
if (context.packageName == YukiXposedModule.modulePackageName) return YLog.innerE("You cannot register Activity Proxy into yourself")
|
||||||
@SuppressLint("ObsoleteSdkInt")
|
@SuppressLint("ObsoleteSdkInt")
|
||||||
if (SystemVersion.isLowTo(SystemVersion.N)) return YLog.innerE("Activity Proxy only support for Android 7.0 (API 24) or higher")
|
if (AndroidVersion.isAtMost(AndroidVersion.N)) return YLog.innerE("Activity Proxy only support for Android 7.0 (API 24) or higher")
|
||||||
runCatching {
|
runCatching {
|
||||||
ActivityProxyConfig.apply {
|
ActivityProxyConfig.apply {
|
||||||
proxyIntentName = "${YukiXposedModule.modulePackageName}.ACTIVITY_PROXY_INTENT"
|
proxyIntentName = "${YukiXposedModule.modulePackageName}.ACTIVITY_PROXY_INTENT"
|
||||||
|
@@ -30,7 +30,7 @@ import android.os.Bundle
|
|||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import android.os.Message
|
import android.os.Message
|
||||||
import com.highcapable.betterandroid.system.extension.tool.SystemVersion
|
import com.highcapable.betterandroid.system.extension.tool.AndroidVersion
|
||||||
import com.highcapable.kavaref.KavaRef.Companion.asResolver
|
import com.highcapable.kavaref.KavaRef.Companion.asResolver
|
||||||
import com.highcapable.kavaref.KavaRef.Companion.resolve
|
import com.highcapable.kavaref.KavaRef.Companion.resolve
|
||||||
import com.highcapable.kavaref.extension.lazyClass
|
import com.highcapable.kavaref.extension.lazyClass
|
||||||
@@ -94,7 +94,7 @@ internal object HandlerDelegateCaller {
|
|||||||
if (intent?.hasExtra(ActivityProxyConfig.proxyIntentName) == true) {
|
if (intent?.hasExtra(ActivityProxyConfig.proxyIntentName) == true) {
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
val subIntent = intent.getParcelableExtra<Intent>(ActivityProxyConfig.proxyIntentName)
|
val subIntent = intent.getParcelableExtra<Intent>(ActivityProxyConfig.proxyIntentName)
|
||||||
if (SystemVersion.isHighOrEqualsTo(SystemVersion.S)) {
|
if (AndroidVersion.isAtLeast(AndroidVersion.S)) {
|
||||||
val currentActivityThread = ActivityThreadClass.resolve()
|
val currentActivityThread = ActivityThreadClass.resolve()
|
||||||
.processor(AndroidHiddenApiBypassResolver.get())
|
.processor(AndroidHiddenApiBypassResolver.get())
|
||||||
.optional(silent = true)
|
.optional(silent = true)
|
||||||
|
@@ -21,14 +21,6 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "17"
|
|
||||||
freeCompilerArgs = listOf(
|
|
||||||
"-Xno-param-assertions",
|
|
||||||
"-Xno-call-assertions",
|
|
||||||
"-Xno-receiver-assertions"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
lint { checkReleaseBuilds = false }
|
lint { checkReleaseBuilds = false }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user