fix annotations

This commit is contained in:
tehcneko 2024-07-29 11:03:43 +08:00
parent 5f342219df
commit 92c067bb15
9 changed files with 35 additions and 3 deletions

View File

@ -63,4 +63,5 @@ android {
dependencies {
compileOnly 'androidx.annotation:annotation:1.8.1'
compileOnly 'io.github.libxposed:api:100'
compileOnly project(":libxposed-compat")
}

View File

@ -6,9 +6,15 @@
public void onPackageLoaded(...);
public void onSystemServerLoaded(...);
}
-keep,allowoptimization,allowobfuscation @io.github.libxposed.api.annotations.* class * {
@io.github.libxposed.api.annotations.BeforeInvocation <methods>;
@io.github.libxposed.api.annotations.AfterInvocation <methods>;
-keep,allowshrinking,allowoptimization,allowobfuscation class ** implements io.github.libxposed.api.XposedInterface$Hooker
-keepclassmembers,allowoptimization class ** implements io.github.libxposed.api.XposedInterface$Hooker {
public *** before(***);
public *** after(***);
public static *** before();
public static *** before(io.github.libxposed.api.XposedInterface$BeforeHookCallback);
public static void after();
public static void after(io.github.libxposed.api.XposedInterface$AfterHookCallback);
public static void after(io.github.libxposed.api.XposedInterface$AfterHookCallback, ***);
}
-repackageclasses

1
libxposed-compat/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

View File

@ -0,0 +1,20 @@
plugins {
id 'com.android.library'
}
android {
namespace 'io.github.libxposed'
compileSdk 34
defaultConfig {
minSdk 24
targetSdk 34
versionCode 1
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest>
</manifest>

View File

@ -19,3 +19,4 @@ dependencyResolutionManagement {
}
rootProject.name = "DisableFlagSecure"
include ':app'
include ':libxposed-compat'