diff --git a/revanced-patch-annotations-processor/api/revanced-patch-annotations-processor.api b/revanced-patch-annotation-processor/api/revanced-patch-annotation-processor.api similarity index 63% rename from revanced-patch-annotations-processor/api/revanced-patch-annotations-processor.api rename to revanced-patch-annotation-processor/api/revanced-patch-annotation-processor.api index 87bc05c..1a6597d 100644 --- a/revanced-patch-annotations-processor/api/revanced-patch-annotations-processor.api +++ b/revanced-patch-annotation-processor/api/revanced-patch-annotation-processor.api @@ -1,10 +1,10 @@ -public abstract interface annotation class app/revanced/patcher/patch/annotations/CompatiblePackage : java/lang/annotation/Annotation { +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/annotations/Patch : java/lang/annotation/Annotation { - public abstract fun compatiblePackages ()[Lapp/revanced/patcher/patch/annotations/CompatiblePackage; +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; @@ -12,14 +12,14 @@ public abstract interface annotation class app/revanced/patcher/patch/annotation public abstract fun use ()Z } -public final class app/revanced/patcher/patch/annotations/processor/PatchProcessor : com/google/devtools/ksp/processing/SymbolProcessor { +public final class app/revanced/patcher/patch/annotation/processor/PatchProcessor : com/google/devtools/ksp/processing/SymbolProcessor { public fun (Lcom/google/devtools/ksp/processing/CodeGenerator;Lcom/google/devtools/ksp/processing/KSPLogger;)V public fun process (Lcom/google/devtools/ksp/processing/Resolver;)Ljava/util/List; } -public final class app/revanced/patcher/patch/annotations/processor/PatchProcessorProvider : com/google/devtools/ksp/processing/SymbolProcessorProvider { +public final class app/revanced/patcher/patch/annotation/processor/PatchProcessorProvider : com/google/devtools/ksp/processing/SymbolProcessorProvider { public fun ()V - public fun create (Lcom/google/devtools/ksp/processing/SymbolProcessorEnvironment;)Lapp/revanced/patcher/patch/annotations/processor/PatchProcessor; + 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; } diff --git a/revanced-patch-annotations-processor/build.gradle.kts b/revanced-patch-annotation-processor/build.gradle.kts similarity index 96% rename from revanced-patch-annotations-processor/build.gradle.kts rename to revanced-patch-annotation-processor/build.gradle.kts index fdf5cfe..2c2f860 100644 --- a/revanced-patch-annotations-processor/build.gradle.kts +++ b/revanced-patch-annotation-processor/build.gradle.kts @@ -46,7 +46,7 @@ publishing { version = project.version.toString() pom { - name = "ReVanced Patch annotations processor" + name = "ReVanced patch annotation processor" description = "Annotation processor for patches." url = "https://revanced.app" diff --git a/revanced-patch-annotation-processor/settings.gradle.kts b/revanced-patch-annotation-processor/settings.gradle.kts new file mode 100644 index 0000000..f1d8160 --- /dev/null +++ b/revanced-patch-annotation-processor/settings.gradle.kts @@ -0,0 +1,2 @@ +rootProject.name = "revanced-patch-annotation-processor" + diff --git a/revanced-patch-annotations-processor/src/main/kotlin/app/revanced/patcher/patch/annotations/PatchAnnotations.kt b/revanced-patch-annotation-processor/src/main/kotlin/app/revanced/patcher/patch/annotation/PatchAnnotations.kt similarity index 96% rename from revanced-patch-annotations-processor/src/main/kotlin/app/revanced/patcher/patch/annotations/PatchAnnotations.kt rename to revanced-patch-annotation-processor/src/main/kotlin/app/revanced/patcher/patch/annotation/PatchAnnotations.kt index 6c28e6e..c6919bc 100644 --- a/revanced-patch-annotations-processor/src/main/kotlin/app/revanced/patcher/patch/annotations/PatchAnnotations.kt +++ b/revanced-patch-annotation-processor/src/main/kotlin/app/revanced/patcher/patch/annotation/PatchAnnotations.kt @@ -1,4 +1,4 @@ -package app.revanced.patcher.patch.annotations +package app.revanced.patcher.patch.annotation import java.lang.annotation.Inherited import kotlin.reflect.KClass diff --git a/revanced-patch-annotations-processor/src/main/kotlin/app/revanced/patcher/patch/annotations/processor/PatchProcessor.kt b/revanced-patch-annotation-processor/src/main/kotlin/app/revanced/patcher/patch/annotation/processor/PatchProcessor.kt similarity index 98% rename from revanced-patch-annotations-processor/src/main/kotlin/app/revanced/patcher/patch/annotations/processor/PatchProcessor.kt rename to revanced-patch-annotation-processor/src/main/kotlin/app/revanced/patcher/patch/annotation/processor/PatchProcessor.kt index b5b19e9..f403126 100644 --- a/revanced-patch-annotations-processor/src/main/kotlin/app/revanced/patcher/patch/annotations/processor/PatchProcessor.kt +++ b/revanced-patch-annotation-processor/src/main/kotlin/app/revanced/patcher/patch/annotation/processor/PatchProcessor.kt @@ -1,10 +1,10 @@ -package app.revanced.patcher.patch.annotations.processor +package app.revanced.patcher.patch.annotation.processor import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.ResourcePatch -import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patcher.patch.annotation.Patch import com.google.devtools.ksp.processing.* import com.google.devtools.ksp.symbol.KSAnnotated import com.google.devtools.ksp.symbol.KSAnnotation diff --git a/revanced-patch-annotations-processor/src/main/kotlin/app/revanced/patcher/patch/annotations/processor/PatchProcessorProvider.kt b/revanced-patch-annotation-processor/src/main/kotlin/app/revanced/patcher/patch/annotation/processor/PatchProcessorProvider.kt similarity index 85% rename from revanced-patch-annotations-processor/src/main/kotlin/app/revanced/patcher/patch/annotations/processor/PatchProcessorProvider.kt rename to revanced-patch-annotation-processor/src/main/kotlin/app/revanced/patcher/patch/annotation/processor/PatchProcessorProvider.kt index 95abc37..0af5cf1 100644 --- a/revanced-patch-annotations-processor/src/main/kotlin/app/revanced/patcher/patch/annotations/processor/PatchProcessorProvider.kt +++ b/revanced-patch-annotation-processor/src/main/kotlin/app/revanced/patcher/patch/annotation/processor/PatchProcessorProvider.kt @@ -1,4 +1,4 @@ -package app.revanced.patcher.patch.annotations.processor +package app.revanced.patcher.patch.annotation.processor import com.google.devtools.ksp.processing.SymbolProcessorEnvironment import com.google.devtools.ksp.processing.SymbolProcessorProvider diff --git a/revanced-patch-annotation-processor/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider b/revanced-patch-annotation-processor/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider new file mode 100644 index 0000000..52884f4 --- /dev/null +++ b/revanced-patch-annotation-processor/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider @@ -0,0 +1 @@ +app.revanced.patcher.patch.annotation.processor.PatchProcessorProvider \ No newline at end of file diff --git a/revanced-patch-annotations-processor/src/test/kotlin/app/revanced/patcher/patch/annotations/processor/TestPatchAnnotationProcessor.kt b/revanced-patch-annotation-processor/src/test/kotlin/app/revanced/patcher/patch/annotation/processor/TestPatchAnnotationProcessor.kt similarity index 98% rename from revanced-patch-annotations-processor/src/test/kotlin/app/revanced/patcher/patch/annotations/processor/TestPatchAnnotationProcessor.kt rename to revanced-patch-annotation-processor/src/test/kotlin/app/revanced/patcher/patch/annotation/processor/TestPatchAnnotationProcessor.kt index f2f8593..c958663 100644 --- a/revanced-patch-annotations-processor/src/test/kotlin/app/revanced/patcher/patch/annotations/processor/TestPatchAnnotationProcessor.kt +++ b/revanced-patch-annotation-processor/src/test/kotlin/app/revanced/patcher/patch/annotation/processor/TestPatchAnnotationProcessor.kt @@ -1,4 +1,4 @@ -package app.revanced.patcher.patch.annotations.processor +package app.revanced.patcher.patch.annotation.processor import app.revanced.patcher.patch.Patch import com.tschuchort.compiletesting.KotlinCompilation diff --git a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/dependencies/DependencyPatch.kt b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/dependencies/DependencyPatch.kt similarity index 63% rename from revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/dependencies/DependencyPatch.kt rename to revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/dependencies/DependencyPatch.kt index c03169d..2230274 100644 --- a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/dependencies/DependencyPatch.kt +++ b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/dependencies/DependencyPatch.kt @@ -1,8 +1,8 @@ -package app.revanced.patcher.patch.annotations.processor.samples.dependencies +package app.revanced.patcher.patch.annotation.processor.samples.dependencies import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.patch.ResourcePatch -import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patcher.patch.annotation.Patch @Patch(name = "Dependency patch") object DependencyPatch : ResourcePatch() { diff --git a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/dependencies/DependentPatch.kt b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/dependencies/DependentPatch.kt similarity index 68% rename from revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/dependencies/DependentPatch.kt rename to revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/dependencies/DependentPatch.kt index 44d6df0..d20dc51 100644 --- a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/dependencies/DependentPatch.kt +++ b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/dependencies/DependentPatch.kt @@ -1,7 +1,7 @@ -package app.revanced.patcher.patch.annotations.processor.samples.dependencies +package app.revanced.patcher.patch.annotation.processor.samples.dependencies import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patcher.patch.annotation.Patch @Patch( name = "Dependent patch", diff --git a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/limitations/manualdependency/DependencyPatch.kt b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/limitations/manualdependency/DependencyPatch.kt similarity index 61% rename from revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/limitations/manualdependency/DependencyPatch.kt rename to revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/limitations/manualdependency/DependencyPatch.kt index d43bd2c..c373c34 100644 --- a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/limitations/manualdependency/DependencyPatch.kt +++ b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/limitations/manualdependency/DependencyPatch.kt @@ -1,8 +1,8 @@ -package app.revanced.patcher.patch.annotations.processor.samples.limitations.manualdependency +package app.revanced.patcher.patch.annotation.processor.samples.limitations.manualdependency import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.patch.ResourcePatch -import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patcher.patch.annotation.Patch @Patch(name = "Dependency patch") object DependencyPatch : ResourcePatch() { diff --git a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/limitations/manualdependency/DependentPatch.kt b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/limitations/manualdependency/DependentPatch.kt similarity index 83% rename from revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/limitations/manualdependency/DependentPatch.kt rename to revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/limitations/manualdependency/DependentPatch.kt index 60121ec..5bc396c 100644 --- a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/limitations/manualdependency/DependentPatch.kt +++ b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/limitations/manualdependency/DependentPatch.kt @@ -1,7 +1,7 @@ -package app.revanced.patcher.patch.annotations.processor.samples.limitations.manualdependency +package app.revanced.patcher.patch.annotation.processor.samples.limitations.manualdependency import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patcher.patch.annotation.Patch @Patch(name = "Dependent patch") object DependentPatch : BytecodePatch( diff --git a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/options/OptionsPatch.kt b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/options/OptionsPatch.kt similarity index 79% rename from revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/options/OptionsPatch.kt rename to revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/options/OptionsPatch.kt index f1a8c22..6bc1027 100644 --- a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/options/OptionsPatch.kt +++ b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/options/OptionsPatch.kt @@ -1,8 +1,8 @@ -package app.revanced.patcher.patch.annotations.processor.samples.options +package app.revanced.patcher.patch.annotation.processor.samples.options import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.patch.ResourcePatch -import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patcher.patch.annotation.Patch import app.revanced.patcher.patch.options.types.StringPatchOption.Companion.stringPatchOption @Patch(name = "Options patch") diff --git a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/processing/ProcessablePatch.kt b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/processing/ProcessablePatch.kt similarity index 63% rename from revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/processing/ProcessablePatch.kt rename to revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/processing/ProcessablePatch.kt index 28d04a0..86767db 100644 --- a/revanced-patch-annotations-processor/src/test/resources/app/revanced/patcher/patch/annotations/processor/samples/processing/ProcessablePatch.kt +++ b/revanced-patch-annotation-processor/src/test/resources/app/revanced/patcher/patch/annotation/processor/samples/processing/ProcessablePatch.kt @@ -1,8 +1,8 @@ -package app.revanced.patcher.patch.annotations.processor.samples.processing +package app.revanced.patcher.patch.annotation.processor.samples.processing import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patcher.patch.annotation.Patch @Patch("Processable patch") object ProcessablePatch : BytecodePatch() { diff --git a/revanced-patch-annotations-processor/settings.gradle.kts b/revanced-patch-annotations-processor/settings.gradle.kts deleted file mode 100644 index a376e09..0000000 --- a/revanced-patch-annotations-processor/settings.gradle.kts +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = "revanced-patch-annotations-processor" - diff --git a/revanced-patch-annotations-processor/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider b/revanced-patch-annotations-processor/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider deleted file mode 100644 index 0a48684..0000000 --- a/revanced-patch-annotations-processor/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider +++ /dev/null @@ -1 +0,0 @@ -app.revanced.patcher.patch.annotations.processor.PatchProcessorProvider \ No newline at end of file diff --git a/revanced-patcher/build.gradle.kts b/revanced-patcher/build.gradle.kts index 8c2c8fd..1a0713f 100644 --- a/revanced-patcher/build.gradle.kts +++ b/revanced-patcher/build.gradle.kts @@ -12,7 +12,7 @@ dependencies { compileOnly(libs.android) - testImplementation(project(":revanced-patch-annotations-processor")) + testImplementation(project(":revanced-patch-annotation-processor")) testImplementation(libs.kotlin.test) } diff --git a/revanced-patcher/src/test/kotlin/app/revanced/patcher/patch/usage/ExampleBytecodePatch.kt b/revanced-patcher/src/test/kotlin/app/revanced/patcher/patch/usage/ExampleBytecodePatch.kt index 9083674..cca07ed 100644 --- a/revanced-patcher/src/test/kotlin/app/revanced/patcher/patch/usage/ExampleBytecodePatch.kt +++ b/revanced-patcher/src/test/kotlin/app/revanced/patcher/patch/usage/ExampleBytecodePatch.kt @@ -7,8 +7,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.or import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.annotations.CompatiblePackage -import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patcher.patch.annotation.CompatiblePackage +import app.revanced.patcher.patch.annotation.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableField.Companion.toMutable import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable diff --git a/settings.gradle.kts b/settings.gradle.kts index 8fdd378..3761ccf 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -19,4 +19,4 @@ dependencyResolutionManagement { } } -include("revanced-patch-annotations-processor", "revanced-patcher") \ No newline at end of file +include("revanced-patch-annotation-processor", "revanced-patcher") \ No newline at end of file