Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add patch annotation processor #231

Merged
merged 3 commits into from Sep 4, 2023
Merged

Conversation

oSumAtrIX
Copy link
Member

Summary

Annotations required reflection and working with them turned out to be rather cumbersome. The annotations have been replaced with properties for the most part, and an annotation processor for patches has been introduced instead. Patches can use the @Patch instead of super constructor parameters.

Breaking changes

Patch annotations have been removed. PatcherException is now thrown in various places. PatchBundleLoader is now a map of patches associated with their name. Patches are now instances. The manifest for patches has been removed, and the properties have been added to patches. Patches are now OptionsContainer. The @Patch annotation has been removed in favor of the @Patch annotation from the annotation processor.

Annotations required reflection and working with them turned out to be rather cumbersome. The annotations have been replaced with properties for the most part.

BREAKING CHANGE: Patch annotations have been removed. PatcherException is now thrown in various places. PatchBundleLoader is now a map of patches associated by their name. Patches are now instances.
This allows other sub-projects to exist.
This commit introduces an annotation processor for patches. Patches can use the `@Patch` instead of super constructor parameters.

BREAKING CHANGE: The manifest for patches has been removed, and the properties have been added to patches. Patches are now `OptionsContainer`. The `@Patch` annotation has been removed in favour of the `@Patch` annotation from the annotation processor.
@oSumAtrIX oSumAtrIX changed the title feat: Add patch annotation processor feat: Add patch annotation processor Sep 4, 2023
@oSumAtrIX oSumAtrIX merged commit a29931f into dev Sep 4, 2023
2 checks passed
revanced-bot pushed a commit that referenced this pull request Sep 4, 2023
# [15.0.0-dev.1](v14.2.2...v15.0.0-dev.1) (2023-09-04)

* feat!: Add patch annotation processor ([3fc6a13](3fc6a13))
* feat!: Remove patch annotations ([3b4db3d](3b4db3d))

### Features

* Add patch annotation processor ([#231](#231)) ([a29931f](a29931f))

### BREAKING CHANGES

* The manifest for patches has been removed, and the properties have been added to patches. Patches are now `OptionsContainer`. The `@Patch` annotation has been removed in favour of the `@Patch` annotation from the annotation processor.
* Patch annotations have been removed. PatcherException is now thrown in various places. PatchBundleLoader is now a map of patches associated by their name. Patches are now instances.
@oSumAtrIX oSumAtrIX deleted the refactor/remove-annotations branch September 4, 2023 04:19
revanced-bot pushed a commit that referenced this pull request Sep 18, 2023
# [15.0.0](v14.2.2...v15.0.0) (2023-09-18)

### Bug Fixes

* Account for source patch dependency for tests ([6918418](6918418))
* Always make the generated patch depend on the source patch ([8de3063](8de3063))
* Catch correct exception ([637d487](637d487))
* Delegate `PatchBundleLoader` by mutable set of patches ([9a109c1](9a109c1))
* Do not resolve the proxied patch to the proxy in the dependency list ([e112837](e112837))
* Do not set `CompatiblePackage.versions` if `@CompatiblePackage.versions` is empty ([6b1e0a1](6b1e0a1))
* Filter for patches correctly ([4bc4b0d](4bc4b0d))
* Find dependency in `context.allPatches` ([670f015](670f015))
* Log the correct patch names ([9fdb8f0](9fdb8f0))
* Make `CompatiblePackage.versions` a property ([67b7dff](67b7dff))
* Print patch name instead of class name ([4e7811e](4e7811e))
* Print stack trace of exception ([aa71146](aa71146))
* Run code-block if `executablePatches` does not yet contain `patch` ([1d7aeca](1d7aeca))
* Suppress logger when loading patches in `PatchBundleLoader` ([72c9eb2](72c9eb2))
* Use correct module name ([080fbe9](080fbe9))

### Code Refactoring

* Internalize processor constructor ([a802d0d](a802d0d))

* feat Use `Set` as super type for `PatchBundleLoader` ([4b76d19](4b76d19))
* feat!: Add patch annotation processor ([3fc6a13](3fc6a13))
* feat!: Remove patch annotations ([3b4db3d](3b4db3d))

### Features

* Add patch annotation processor ([#231](#231)) ([a29931f](a29931f))

### BREAKING CHANGES

* This gets rid of the public constructor.
* `PatchBundleLoader` is not a map anymore
* This renames packages and the Maven package.
* The manifest for patches has been removed, and the properties have been added to patches. Patches are now `OptionsContainer`. The `@Patch` annotation has been removed in favour of the `@Patch` annotation from the annotation processor.
* Patch annotations have been removed. PatcherException is now thrown in various places. PatchBundleLoader is now a map of patches associated by their name. Patches are now instances.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant