-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
117 changed files
with
2,314 additions
and
1,289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,10 @@ | ||
plugins { | ||
kotlin("jvm") version "1.8.20" | ||
`maven-publish` | ||
kotlin("jvm") version "1.9.0" apply false | ||
alias(libs.plugins.binary.compatibility.validator) | ||
} | ||
|
||
group = "app.revanced" | ||
allprojects { | ||
apply(plugin = "maven-publish") | ||
|
||
dependencies { | ||
implementation(libs.kotlinx.coroutines.core) | ||
implementation(libs.xpp3) | ||
implementation(libs.smali) | ||
implementation(libs.multidexlib2) | ||
implementation(libs.apktool.lib) | ||
implementation(libs.kotlin.reflect) | ||
|
||
compileOnly(libs.android) | ||
|
||
testImplementation(libs.kotlin.test) | ||
} | ||
|
||
tasks { | ||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("PASSED", "SKIPPED", "FAILED") | ||
} | ||
} | ||
|
||
processResources { | ||
expand("projectVersion" to project.version) | ||
} | ||
} | ||
|
||
kotlin { jvmToolchain(11) } | ||
|
||
java { | ||
withSourcesJar() | ||
} | ||
|
||
publishing { | ||
repositories { | ||
mavenLocal() | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher") | ||
credentials { | ||
username = System.getenv("GITHUB_ACTOR") | ||
password = System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
} | ||
publications { | ||
create<MavenPublication>("gpr") { | ||
from(components["java"]) | ||
} | ||
} | ||
} | ||
group = "app.revanced" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
org.gradle.parallel = true | ||
org.gradle.caching = true | ||
kotlin.code.style = official | ||
version = 14.2.2 | ||
version = 15.0.0-dev.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
revanced-patch-annotation-processor/api/revanced-patch-annotation-processor.api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
public abstract interface annotation class app/revanced/patcher/patch/annotation/CompatiblePackage : java/lang/annotation/Annotation { | ||
public abstract fun name ()Ljava/lang/String; | ||
public abstract fun versions ()[Ljava/lang/String; | ||
} | ||
|
||
public abstract interface annotation class app/revanced/patcher/patch/annotation/Patch : java/lang/annotation/Annotation { | ||
public abstract fun compatiblePackages ()[Lapp/revanced/patcher/patch/annotation/CompatiblePackage; | ||
public abstract fun dependencies ()[Ljava/lang/Class; | ||
public abstract fun description ()Ljava/lang/String; | ||
public abstract fun name ()Ljava/lang/String; | ||
public abstract fun requiresIntegrations ()Z | ||
public abstract fun use ()Z | ||
} | ||
|
||
public final class app/revanced/patcher/patch/annotation/processor/PatchProcessor : com/google/devtools/ksp/processing/SymbolProcessor { | ||
public fun process (Lcom/google/devtools/ksp/processing/Resolver;)Ljava/util/List; | ||
} | ||
|
||
public final class app/revanced/patcher/patch/annotation/processor/PatchProcessorProvider : com/google/devtools/ksp/processing/SymbolProcessorProvider { | ||
public fun <init> ()V | ||
public fun create (Lcom/google/devtools/ksp/processing/SymbolProcessorEnvironment;)Lapp/revanced/patcher/patch/annotation/processor/PatchProcessor; | ||
public synthetic fun create (Lcom/google/devtools/ksp/processing/SymbolProcessorEnvironment;)Lcom/google/devtools/ksp/processing/SymbolProcessor; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
plugins { | ||
kotlin("jvm") version "1.9.0" | ||
alias(libs.plugins.ksp) | ||
} | ||
|
||
dependencies { | ||
implementation(libs.symbol.processing.api) | ||
implementation(libs.kotlinpoet.ksp) | ||
implementation(project(":revanced-patcher")) | ||
|
||
testImplementation(libs.kotlin.test) | ||
testImplementation(libs.kotlin.compile.testing) | ||
} | ||
|
||
tasks { | ||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("PASSED", "SKIPPED", "FAILED") | ||
} | ||
} | ||
} | ||
|
||
kotlin { jvmToolchain(11) } | ||
|
||
java { | ||
withSourcesJar() | ||
} | ||
|
||
publishing { | ||
repositories { | ||
mavenLocal() | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher") | ||
credentials { | ||
username = System.getenv("GITHUB_ACTOR") | ||
password = System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
} | ||
publications { | ||
create<MavenPublication>("gpr") { | ||
from(components["java"]) | ||
|
||
version = project.version.toString() | ||
|
||
pom { | ||
name = "ReVanced patch annotation processor" | ||
description = "Annotation processor for patches." | ||
url = "https://revanced.app" | ||
|
||
licenses { | ||
license { | ||
name = "GNU General Public License v3.0" | ||
url = "https://www.gnu.org/licenses/gpl-3.0.en.html" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "ReVanced" | ||
name = "ReVanced" | ||
email = "contact@revanced.app" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:git://github.com/revanced/revanced-patcher.git" | ||
developerConnection = "scm:git:git@github.com:revanced/revanced-patcher.git" | ||
url = "https://github.com/revanced/revanced-patcher" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rootProject.name = "revanced-patch-annotation-processor" | ||
|
38 changes: 38 additions & 0 deletions
38
...ation-processor/src/main/kotlin/app/revanced/patcher/patch/annotation/PatchAnnotations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package app.revanced.patcher.patch.annotation | ||
|
||
import java.lang.annotation.Inherited | ||
import kotlin.reflect.KClass | ||
|
||
/** | ||
* Annotation for [app.revanced.patcher.patch.Patch] classes. | ||
* | ||
* @param name The name of the patch. If empty, the patch will be unnamed. | ||
* @param description The description of the patch. If empty, no description will be used. | ||
* @param dependencies The patches this patch depends on. | ||
* @param compatiblePackages The packages this patch is compatible with. | ||
* @param use Whether this patch should be used. | ||
* @param requiresIntegrations Whether this patch requires integrations. | ||
*/ | ||
@Retention(AnnotationRetention.SOURCE) | ||
@Target(AnnotationTarget.CLASS) | ||
@Inherited | ||
annotation class Patch( | ||
val name: String = "", | ||
val description: String = "", | ||
val dependencies: Array<KClass<out app.revanced.patcher.patch.Patch<*>>> = [], | ||
val compatiblePackages: Array<CompatiblePackage> = [], | ||
val use: Boolean = true, | ||
// TODO: Remove this property, once integrations are coupled with patches. | ||
val requiresIntegrations: Boolean = false, | ||
) | ||
|
||
/** | ||
* A package that a [app.revanced.patcher.patch.Patch] is compatible with. | ||
* | ||
* @param name The name of the package. | ||
* @param versions The versions of the package. | ||
*/ | ||
annotation class CompatiblePackage( | ||
val name: String, | ||
val versions: Array<String> = [], | ||
) |
Oops, something went wrong.