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

chore: Merge branch dev to main #3

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7e92b59
chore(release): 1.0.0-dev.1 [skip ci]
semantic-release-bot Jul 22, 2024
ea6bfe0
fix: Do not raise an exception when environment variables are not set…
oSumAtrIX Aug 6, 2024
b1a00e9
chore(release): 1.0.0-dev.2 [skip ci]
semantic-release-bot Aug 6, 2024
2597efe
fix: Build DEX from patches file by using internal APIs instead of CLIs
oSumAtrIX Aug 8, 2024
3069668
chore(release): 1.0.0-dev.3 [skip ci]
semantic-release-bot Aug 8, 2024
715fb96
fix: Create working directory before trying to use it
oSumAtrIX Aug 8, 2024
e911107
chore(release): 1.0.0-dev.4 [skip ci]
semantic-release-bot Aug 8, 2024
397b7b3
fix: Create a dummy publishing repository to fix publications & signing
oSumAtrIX Sep 8, 2024
858baed
chore: Use correct domain object naming convention for publication
oSumAtrIX Sep 8, 2024
ad7bcd9
docs: Fix links to plugins in README
oSumAtrIX Sep 8, 2024
4ec3370
chore(release): 1.0.0-dev.5 [skip ci]
semantic-release-bot Sep 8, 2024
b4e68cd
ci: Adjust release commit message
oSumAtrIX Sep 30, 2024
43625a9
build(Needs bump): Update dependencies
oSumAtrIX Sep 30, 2024
78fc04b
ci: Use permissions and regular GitHub token instead of PAT
oSumAtrIX Sep 30, 2024
e11882a
chore: Release v1.0.0-dev.6 [skip ci]
semantic-release-bot Oct 1, 2024
16ee9e0
perf: Use task to build required DEX only instead of entire APK
oSumAtrIX Nov 18, 2024
0f42166
feat: Bump source and target compatibility to Java 17
oSumAtrIX Nov 18, 2024
c0ef614
feat: Allow creating extensions in packages
oSumAtrIX Nov 21, 2024
9f18768
feat: Add ability to globally configure extension projects
oSumAtrIX Nov 26, 2024
71d8b9a
chore: Dump API
oSumAtrIX Nov 26, 2024
21b29d8
chore: Release v1.0.0-dev.7 [skip ci]
semantic-release-bot Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
jobs:
release:
name: Release
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -46,5 +49,5 @@ jobs:

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm exec semantic-release
3 changes: 2 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"CHANGELOG.md",
"gradle.properties",
"patches.json"
]
],
"message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# [1.0.0-dev.7](https://github.com/ReVanced/revanced-patches-gradle-plugin/compare/v1.0.0-dev.6...v1.0.0-dev.7) (2024-11-26)


### Features

* Add ability to globally configure extension projects ([9f18768](https://github.com/ReVanced/revanced-patches-gradle-plugin/commit/9f18768042d7b85fa3bb93246571bdff8a5f9615))
* Allow creating extensions in packages ([c0ef614](https://github.com/ReVanced/revanced-patches-gradle-plugin/commit/c0ef614cb33400087f677ead2b257fcf177d9672))
* Bump source and target compatibility to Java 17 ([0f42166](https://github.com/ReVanced/revanced-patches-gradle-plugin/commit/0f421669b31d9d669690825a8fdb37c23ad4f802))


### Performance Improvements

* Use task to build required DEX only instead of entire APK ([16ee9e0](https://github.com/ReVanced/revanced-patches-gradle-plugin/commit/16ee9e03d46ef465681a3e530a925eb19bfb5604))

# [1.0.0-dev.6](https://github.com/ReVanced/revanced-patches-gradle-plugin/compare/v1.0.0-dev.5...v1.0.0-dev.6) (2024-10-01)

# [1.0.0-dev.5](https://github.com/ReVanced/revanced-patches-gradle-plugin/compare/v1.0.0-dev.4...v1.0.0-dev.5) (2024-09-08)


### Bug Fixes

* Create a dummy publishing repository to fix publications & signing ([397b7b3](https://github.com/ReVanced/revanced-patches-gradle-plugin/commit/397b7b3393fc06f0002536486096fff100abe7ad))

# [1.0.0-dev.4](https://github.com/ReVanced/revanced-patches-gradle-plugin/compare/v1.0.0-dev.3...v1.0.0-dev.4) (2024-08-08)


### Bug Fixes

* Create working directory before trying to use it ([715fb96](https://github.com/ReVanced/revanced-patches-gradle-plugin/commit/715fb96382037fd66351e5735e39a3dd512b1346))

# [1.0.0-dev.3](https://github.com/ReVanced/revanced-patches-gradle-plugin/compare/v1.0.0-dev.2...v1.0.0-dev.3) (2024-08-08)


### Bug Fixes

* Build DEX from patches file by using internal APIs instead of CLIs ([2597efe](https://github.com/ReVanced/revanced-patches-gradle-plugin/commit/2597efe474f24c93b68e0683bc0e9622e48623d1))

# [1.0.0-dev.2](https://github.com/ReVanced/revanced-patches-gradle-plugin/compare/v1.0.0-dev.1...v1.0.0-dev.2) (2024-08-06)


### Bug Fixes

* Do not raise an exception when environment variables are not set for repository credentials ([ea6bfe0](https://github.com/ReVanced/revanced-patches-gradle-plugin/commit/ea6bfe0c86b7b1c114bfa520753e6b53c501b0b7))

# 1.0.0-dev.1 (2024-07-22)


### Features

* Initialize project ([705b448](https://github.com/ReVanced/revanced-patches-gradle-plugin/commit/705b4483dbd33352e79cff289786ef26cad977cf))
60 changes: 40 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ ReVanced Patches Gradle plugin configures a project to develop ReVanced Patches.

For that, the plugin provides:

- The [settings plugin](plugin/src/main/kotlin/app/revanced/patches/gradle/SettingsPlugin.kt):
Applied to the `settings.gradle.kts` file, configures the project repositories and subprojects
- The [patches plugin](plugin/src/main/kotlin/app/revanced/patches/gradle/PatchesPlugin.kt):
Applied to the patches subproject by the settings plugin
- The [extension plugin](plugin/src/main/kotlin/app/revanced/patches/gradle/ExtensionPlugin.kt):
Applied to extension subprojects by the settings plugin
- The [settings plugin](src/main/kotlin/app/revanced/patches/gradle/SettingsPlugin.kt):
Applied to the `settings.gradle.kts` file, configures the project repositories and subprojects
- The [patches plugin](src/main/kotlin/app/revanced/patches/gradle/PatchesPlugin.kt):
Applied to the patches subproject by the settings plugin
- The [extension plugin](src/main/kotlin/app/revanced/patches/gradle/ExtensionPlugin.kt):
Applied to extension subprojects by the settings plugin

> [!CAUTION]
> This plugin is not stable yet and likely to change due to lacking experience with Gradle plugins.
Expand All @@ -97,18 +97,36 @@ pluginManagement {
gradlePluginPortal()
google()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/revanced/registry")
credentials {
username = providers.gradleProperty("gpr.user")
password = providers.gradleProperty("gpr.key")
}
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/revanced/registry")
credentials {
username = providers.gradleProperty("gpr.user")
password = providers.gradleProperty("gpr.key")
}
}
}
}

plugins {
id("app.revanced.patches") version "<version>"
id("app.revanced.patches") version "<version>"
}

// This block is optional and can be used to configure the patches and extension projects.
settings {
// "patches" is the default.
patchesProjectPath = "patches"

extensions {
// The path containing the extension projects. "extensions" is the default.
projectsPath = "extensions"

// A default namespace for extension projects. null is the default.
defaultNamespace = "app.revanced.extension"

// Proguard files relative to the extension project.
// By default, isMinifyEnabled is false, unless a ProGuard file is added.
proguardFiles("../proguard-rules.pro")
}
}
```

Expand All @@ -132,15 +150,15 @@ patches {
> [!NOTE]
> By default, the plugin expects the patches project to be in the `patches` directory.

Create the extension project and configure the `build.gradle.kts` file:
Create the extension project and add an empty `build.gradle.kts` file.
Unless the `build.gradle.kts` file is empty, the plugin will not recognize the extension project.
By default, the extension name will be inferred from the relative path to the extension project.
For example, the extension name for the `extensions/extension` project will be `extensions/extension.rve`.
To set an extension name explicitly, add the following to the `build.gradle.kts` file:

```kotlin
extension {
name = "extensions/extension.rve"
}

android {
namespace = "app.revanced.extension"
name = "extensions/extension.rve"
}
```

Expand All @@ -162,7 +180,9 @@ To build ReVanced Patches Gradle plugin, follow these steps:
## 📜 Licence

ReVanced Patches Gradle plugin is licensed under the GPLv3 license.
Please see the [license file](LICENSE) for more information. [tl;dr](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) you may copy, distribute and modify
Please see the [license file](LICENSE) for more
information. [tl;dr](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) you may copy, distribute and
modify
ReVanced Patches Gradle plugin as long as you track changes/dates in source files.
Any modifications to ReVanced Patches Gradle plugin must also be made available under the GPL,
along with build & install instructions.
71 changes: 54 additions & 17 deletions api/revanced-patches-gradle-plugin.api
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
public abstract class app/revanced/patches/gradle/ExtensionExtension {
public class app/revanced/patches/gradle/ExtensionExtension {
public fun <init> ()V
public abstract fun getName ()Lorg/gradle/api/provider/Property;
public final fun getName ()Ljava/lang/String;
public final fun setName (Ljava/lang/String;)V
}

public abstract class app/revanced/patches/gradle/ExtensionPlugin : org/gradle/api/Plugin {
Expand All @@ -9,21 +10,35 @@ public abstract class app/revanced/patches/gradle/ExtensionPlugin : org/gradle/a
public fun apply (Lorg/gradle/api/Project;)V
}

public abstract class app/revanced/patches/gradle/PatchesExtension {
public fun <init> (Lorg/gradle/api/model/ObjectFactory;)V
public final class app/revanced/patches/gradle/ExtensionPlugin$inlined$sam$i$org_gradle_api_Action$0 : org/gradle/api/Action {
public fun <init> (Lkotlin/jvm/functions/Function1;)V
public final synthetic fun execute (Ljava/lang/Object;)V
}

public class app/revanced/patches/gradle/PatchesExtension {
public fun <init> ()V
public final fun about (Lkotlin/jvm/functions/Function1;)V
public abstract fun getExtensionsProjectPath ()Lorg/gradle/api/provider/Property;
public final fun getAbout ()Lapp/revanced/patches/gradle/PatchesExtension$About;
public final fun getExtensionsProjectPath ()Ljava/lang/String;
public final fun setExtensionsProjectPath (Ljava/lang/String;)V
}

public abstract class app/revanced/patches/gradle/PatchesExtension$About {
public fun <init> (Lorg/gradle/api/Project;)V
public abstract fun getAuthor ()Lorg/gradle/api/provider/Property;
public abstract fun getContact ()Lorg/gradle/api/provider/Property;
public abstract fun getDescription ()Lorg/gradle/api/provider/Property;
public abstract fun getLicense ()Lorg/gradle/api/provider/Property;
public abstract fun getName ()Lorg/gradle/api/provider/Property;
public abstract fun getSource ()Lorg/gradle/api/provider/Property;
public abstract fun getWebsite ()Lorg/gradle/api/provider/Property;
public final class app/revanced/patches/gradle/PatchesExtension$About {
public fun <init> ()V
public final fun getAuthor ()Ljava/lang/String;
public final fun getContact ()Ljava/lang/String;
public final fun getDescription ()Ljava/lang/String;
public final fun getLicense ()Ljava/lang/String;
public final fun getName ()Ljava/lang/String;
public final fun getSource ()Ljava/lang/String;
public final fun getWebsite ()Ljava/lang/String;
public final fun setAuthor (Ljava/lang/String;)V
public final fun setContact (Ljava/lang/String;)V
public final fun setDescription (Ljava/lang/String;)V
public final fun setLicense (Ljava/lang/String;)V
public final fun setName (Ljava/lang/String;)V
public final fun setSource (Ljava/lang/String;)V
public final fun setWebsite (Ljava/lang/String;)V
}

public abstract class app/revanced/patches/gradle/PatchesPlugin : org/gradle/api/Plugin {
Expand All @@ -32,10 +47,32 @@ public abstract class app/revanced/patches/gradle/PatchesPlugin : org/gradle/api
public fun apply (Lorg/gradle/api/Project;)V
}

public abstract class app/revanced/patches/gradle/SettingsExtension {
public class app/revanced/patches/gradle/SettingsExtension {
public fun <init> ()V
public abstract fun getExtensionsProjectPath ()Lorg/gradle/api/provider/Property;
public abstract fun getPatchesProjectPath ()Lorg/gradle/api/provider/Property;
public final fun extensions (Lkotlin/jvm/functions/Function1;)V
public final fun getExtensionsExtension ()Lapp/revanced/patches/gradle/SettingsExtension$ExtensionsExtension;
public final fun getPatchesProjectPath ()Ljava/lang/String;
public final fun setPatchesProjectPath (Ljava/lang/String;)V
}

public final class app/revanced/patches/gradle/SettingsExtension$ExtensionsExtension {
public fun <init> ()V
public final fun getDefaultNamespace ()Ljava/lang/String;
public final fun getProjectsPath ()Ljava/lang/String;
public final fun proguardFiles ([Ljava/lang/String;)V
public final fun setDefaultNamespace (Ljava/lang/String;)V
public final fun setProjectsPath (Ljava/lang/String;)V
}

public abstract class app/revanced/patches/gradle/SettingsExtensionProvider : org/gradle/api/services/BuildService, org/gradle/api/services/BuildServiceParameters {
public fun <init> ()V
}

public abstract interface class app/revanced/patches/gradle/SettingsExtensionProvider$Params : org/gradle/api/services/BuildServiceParameters {
public abstract fun getDefaultNamespace ()Ljava/lang/String;
public abstract fun getProguardFiles ()Ljava/util/Set;
public abstract fun setDefaultNamespace (Ljava/lang/String;)V
public abstract fun setProguardFiles (Ljava/util/Set;)V
}

public abstract class app/revanced/patches/gradle/SettingsPlugin : org/gradle/api/Plugin {
Expand Down
8 changes: 5 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ repositories {
}

dependencies {
implementation(gradleApi())
implementation(gradleKotlinDsl())
implementation(libs.android.application)
implementation(libs.binary.compatibility.validator)
implementation(libs.guava)
implementation(libs.kotlin)
implementation(libs.kotlin.android)
implementation(libs.android.application)

implementation(gradleApi())
implementation(gradleKotlinDsl())
}

java {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.parallel=true
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style=official
version=1.0.0
kotlin.code.style = official
version = 1.0.0-dev.7
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ pluginPublish = "1.2.1"
binary-compatibility-validator = "0.15.1"
#noinspection GradleDependency
agp = "8.2.2" # 8.3.0 causes Java verifier error: https://github.com/ReVanced/revanced-patches/issues/2818
guava = "33.2.1-jre"

[libraries]
binary-compatibility-validator = { module = "org.jetbrains.kotlinx.binary-compatibility-validator:org.jetbrains.kotlinx.binary-compatibility-validator.gradle.plugin", version.ref = "binary-compatibility-validator" }
kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-android = { module = "org.jetbrains.kotlin.android:org.jetbrains.kotlin.android.gradle.plugin", version.ref = "kotlin" }
android-application = { module = "com.android.application:com.android.application.gradle.plugin", version.ref = "agp" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }

[plugins]
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin"}
Expand Down
Loading