From 5f71dec911f13169603a248c6aab4236baade005 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 26 Jan 2024 22:52:49 +0100 Subject: [PATCH 01/16] chore: Rename CI step --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c6a93120b..970ac34d8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: - name: Cache Gradle uses: burrunan/gradle-cache-action@v1 - - name: Build with Gradle + - name: Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./gradlew build clean From 21e2b6d183f4bc8097ee5538a8e2eca544e6921d Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 13 Feb 2024 02:55:46 +0100 Subject: [PATCH 02/16] chore: Add `.editorconfig` --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..2d6d258f47 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,3 @@ +[*.{kt,kts}] +ktlint_code_style = intellij_idea +ktlint_standard_no-wildcard-imports = disabled \ No newline at end of file From 6b4cd509c58fdcf1715ba8476f69d668616415f7 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 13 Feb 2024 02:55:54 +0100 Subject: [PATCH 03/16] build: Bump dependencies --- gradle/libs.versions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 23b40094ab..4002774ec2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -revanced-patcher = "19.0.0" -smali = "3.0.3" +revanced-patcher = "19.2.0" +smali = "3.0.4" guava = "32.1.2-jre" gson = "2.10.1" From a092eb6e544354c6e01a84b3d3c760f3e67a1057 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 13 Feb 2024 03:31:45 +0100 Subject: [PATCH 04/16] chore: Remove usages of deprecated APIs --- src/main/kotlin/your/org/patches/example/ExamplePatch.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/your/org/patches/example/ExamplePatch.kt b/src/main/kotlin/your/org/patches/example/ExamplePatch.kt index 6e8069f5f4..ab99017e6e 100644 --- a/src/main/kotlin/your/org/patches/example/ExamplePatch.kt +++ b/src/main/kotlin/your/org/patches/example/ExamplePatch.kt @@ -13,7 +13,7 @@ import app.revanced.patcher.patch.annotation.Patch ], ) @Suppress("unused") -object ExamplePatch : BytecodePatch() { +object ExamplePatch : BytecodePatch(emptySet()) { override fun execute(context: BytecodeContext) { // TODO("Not yet implemented") } From 908ccaed876f0e9d182ef6c6d0da9349825278f9 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 14 Feb 2024 02:41:41 +0100 Subject: [PATCH 05/16] build: Bump Gradle --- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a59d94b7a1..3f203e9f9d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip -distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionSha256Sum=9631d53cf3e74bfa726893aee1f8994fee4e060c401335946dba2156f440f24c zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dist \ No newline at end of file From 526d90114693e95e8877d6c2880761773889582a Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 20 Feb 2024 05:46:40 +0100 Subject: [PATCH 06/16] build: Bump dependencies --- build.gradle.kts | 10 +- gradle/libs.versions.toml | 12 +- package-lock.json | 282 ++++++++++++++++++++++++++++++-------- package.json | 2 +- 4 files changed, 237 insertions(+), 69 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c2a7092867..1db66cd753 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,8 @@ import org.gradle.kotlin.dsl.support.listFilesOrdered plugins { - kotlin("jvm") version "1.9.10" + alias(libs.plugins.kotlin) + alias(libs.plugins.binary.compatibility.validator) `maven-publish` } @@ -17,13 +18,6 @@ repositories { dependencies { implementation(libs.revanced.patcher) implementation(libs.smali) - // TODO: Required because build fails without it. Find a way to remove this dependency. - implementation(libs.guava) - // Used in JsonGenerator. - implementation(libs.gson) - - // A dependency to the Android library unfortunately fails the build, which is why this is required. - compileOnly(project("dummy")) } kotlin { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4002774ec2..05975ca17d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,13 @@ [versions] -revanced-patcher = "19.2.0" +revanced-patcher = "19.3.1" smali = "3.0.4" -guava = "32.1.2-jre" -gson = "2.10.1" +binary-compatibility-validator = "0.14.0" +kotlin = "1.9.22" [libraries] revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" } smali = { module = "com.android.tools.smali:smali", version.ref = "smali" } -guava = { module = "com.google.guava:guava", version.ref = "guava" } -gson = { module = "com.google.code.gson:gson", version.ref = "gson" } + +[plugins] +binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" } +kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } diff --git a/package-lock.json b/package-lock.json index 29e79ed213..3352b7ecef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "revanced-patches", + "name": "revanced-patches-template", "lockfileVersion": 3, "requires": true, "packages": { @@ -9,7 +9,7 @@ "@semantic-release/changelog": "^6.0.3", "@semantic-release/git": "^10.0.1", "gradle-semantic-release-plugin": "^1.9.1", - "semantic-release": "^23.0.0" + "semantic-release": "^23.0.2" } }, "node_modules/@babel/code-frame": { @@ -326,9 +326,9 @@ } }, "node_modules/@octokit/request": { - "version": "8.1.6", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz", - "integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.2.0.tgz", + "integrity": "sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==", "dev": true, "dependencies": { "@octokit/endpoint": "^9.0.0", @@ -564,6 +564,26 @@ "node": ">= 16" } }, + "node_modules/@saithodev/semantic-release-backmerge/node_modules/marked-terminal": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-6.2.0.tgz", + "integrity": "sha512-ubWhwcBFHnXsjYNsu+Wndpg0zhY4CahSpPlA70PlO0rR9r2sZpkyU+rkCsOWH+KMEkx847UpALON+HWgxowFtw==", + "dev": true, + "dependencies": { + "ansi-escapes": "^6.2.0", + "cardinal": "^2.1.1", + "chalk": "^5.3.0", + "cli-table3": "^0.6.3", + "node-emoji": "^2.1.3", + "supports-hyperlinks": "^3.0.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "marked": ">=1 <12" + } + }, "node_modules/@saithodev/semantic-release-backmerge/node_modules/mimic-fn": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", @@ -1195,9 +1215,9 @@ } }, "node_modules/@sindresorhus/merge-streams": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-1.0.0.tgz", - "integrity": "sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.2.1.tgz", + "integrity": "sha512-255V7MMIKw6aQ43Wbqp9HZ+VHn6acddERTLiiLnlcPLU9PdTq9Aijl12oklAgUEblLWye+vHLzmqBx6f2TGcZw==", "dev": true, "engines": { "node": ">=18" @@ -1282,6 +1302,12 @@ "integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==", "dev": true }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1376,6 +1402,81 @@ "node": ">=6" } }, + "node_modules/cli-highlight": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", + "integrity": "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "highlight.js": "^10.7.1", + "mz": "^2.4.0", + "parse5": "^5.1.1", + "parse5-htmlparser2-tree-adapter": "^6.0.0", + "yargs": "^16.0.0" + }, + "bin": { + "highlight": "bin/highlight" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/cli-highlight/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cli-highlight/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cli-highlight/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cli-highlight/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/cli-table3": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", @@ -1818,9 +1919,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -1888,9 +1989,9 @@ } }, "node_modules/fastq": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -2052,12 +2153,12 @@ } }, "node_modules/globby": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.0.tgz", - "integrity": "sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.1.tgz", + "integrity": "sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==", "dev": true, "dependencies": { - "@sindresorhus/merge-streams": "^1.0.0", + "@sindresorhus/merge-streams": "^2.1.0", "fast-glob": "^3.3.2", "ignore": "^5.2.4", "path-type": "^5.0.0", @@ -2142,9 +2243,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -2153,6 +2254,15 @@ "node": ">= 0.4" } }, + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/hook-std": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-3.0.0.tgz", @@ -2178,9 +2288,9 @@ } }, "node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.1.tgz", + "integrity": "sha512-My1KCEPs6A0hb4qCVzYp8iEvA8j8YqcvXLZZH8C9OFuTYpYjHE7N2dtG3mRl1HMD4+VGXpF3XcDVcxGBT7yDZQ==", "dev": true, "dependencies": { "agent-base": "^7.1.0", @@ -2191,9 +2301,9 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.3.tgz", + "integrity": "sha512-kCnwztfX0KZJSLOBrcL0emLeFako55NWMovvyPP2AjsghNk9RB1yjSI+jVumPHYZsNXegNoqupSW9IY3afSH8w==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -2213,9 +2323,9 @@ } }, "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -2629,9 +2739,9 @@ } }, "node_modules/marked": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/marked/-/marked-11.1.1.tgz", - "integrity": "sha512-EgxRjgK9axsQuUa/oKMx5DEY8oXpKJfk61rT5iY3aRlgU6QJtUcxU5OAymdhCvWvhYcd9FKmO5eQoX8m9VGJXg==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-12.0.0.tgz", + "integrity": "sha512-Vkwtq9rLqXryZnWaQc86+FHLC6tr/fycMfYAhiOIXkrNmeGAyhSxjqu0Rs1i0bBqw5u0S7+lV9fdH2ZSVaoa0w==", "dev": true, "bin": { "marked": "bin/marked.js" @@ -2641,14 +2751,14 @@ } }, "node_modules/marked-terminal": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-6.2.0.tgz", - "integrity": "sha512-ubWhwcBFHnXsjYNsu+Wndpg0zhY4CahSpPlA70PlO0rR9r2sZpkyU+rkCsOWH+KMEkx847UpALON+HWgxowFtw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-7.0.0.tgz", + "integrity": "sha512-sNEx8nn9Ktcm6pL0TnRz8tnXq/mSS0Q1FRSwJOAqw4lAB4l49UeDf85Gm1n9RPFm5qurCPjwi1StAQT2XExhZw==", "dev": true, "dependencies": { "ansi-escapes": "^6.2.0", - "cardinal": "^2.1.1", "chalk": "^5.3.0", + "cli-highlight": "^2.1.11", "cli-table3": "^0.6.3", "node-emoji": "^2.1.3", "supports-hyperlinks": "^3.0.0" @@ -2657,7 +2767,7 @@ "node": ">=16.0.0" }, "peerDependencies": { - "marked": ">=1 <12" + "marked": ">=1 <13" } }, "node_modules/meow": { @@ -2739,6 +2849,17 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -5551,6 +5672,15 @@ "inBundle": true, "license": "ISC" }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5695,6 +5825,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "dev": true + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "dependencies": { + "parse5": "^6.0.1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, "node_modules/parsimmon": { "version": "1.18.1", "resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-1.18.1.tgz", @@ -5860,9 +6011,9 @@ } }, "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.10.1.tgz", - "integrity": "sha512-7ZnJYTp6uc04uYRISWtiX3DSKB/fxNQT0B5o1OUeCqiQiwF+JC9+rJiZIDrPrNCLLuTqyQmh4VdQqh/ZOkv9MQ==", + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.10.2.tgz", + "integrity": "sha512-anpAG63wSpdEbLwOqH8L84urkL6PiVIov3EMmgIhhThevh9aiMQov+6Btx0wldNcvm4wV+e2/Rt1QdDwKHFbHw==", "dev": true, "engines": { "node": ">=16" @@ -5889,9 +6040,9 @@ } }, "node_modules/read-pkg/node_modules/type-fest": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.10.1.tgz", - "integrity": "sha512-7ZnJYTp6uc04uYRISWtiX3DSKB/fxNQT0B5o1OUeCqiQiwF+JC9+rJiZIDrPrNCLLuTqyQmh4VdQqh/ZOkv9MQ==", + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.10.2.tgz", + "integrity": "sha512-anpAG63wSpdEbLwOqH8L84urkL6PiVIov3EMmgIhhThevh9aiMQov+6Btx0wldNcvm4wV+e2/Rt1QdDwKHFbHw==", "dev": true, "engines": { "node": ">=16" @@ -5994,9 +6145,9 @@ "dev": true }, "node_modules/semantic-release": { - "version": "23.0.0", - "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-23.0.0.tgz", - "integrity": "sha512-Jz7jEWO2igTtske112gC4PPE2whCMVrsgxUPG3/SZI7VE357suIUZFlJd1Yu0g2I6RPc2HxNEfUg7KhmDTjwqg==", + "version": "23.0.2", + "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-23.0.2.tgz", + "integrity": "sha512-OnVYJ6Xgzwe1x8MKswba7RU9+5djS1MWRTrTn5qsq3xZYpslroZkV9Pt0dA2YcIuieeuSZWJhn+yUWoBUHO5Fw==", "dev": true, "dependencies": { "@semantic-release/commit-analyzer": "^11.0.0", @@ -6017,8 +6168,8 @@ "hosted-git-info": "^7.0.0", "import-from-esm": "^1.3.1", "lodash-es": "^4.17.21", - "marked": "^11.0.0", - "marked-terminal": "^6.0.0", + "marked": "^12.0.0", + "marked-terminal": "^7.0.0", "micromatch": "^4.0.2", "p-each-series": "^3.0.0", "p-reduce": "^3.0.0", @@ -6247,9 +6398,9 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -6481,9 +6632,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", - "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", + "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", "dev": true }, "node_modules/split2": { @@ -6655,6 +6806,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", diff --git a/package.json b/package.json index 3101070000..637626674f 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,6 @@ "@semantic-release/changelog": "^6.0.3", "@semantic-release/git": "^10.0.1", "gradle-semantic-release-plugin": "^1.9.1", - "semantic-release": "^23.0.0" + "semantic-release": "^23.0.2" } } From cdab0e6a53dd9395822172c4162af10e1130f092 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 20 Feb 2024 05:48:23 +0100 Subject: [PATCH 07/16] build: Sign release artifacts --- .github/workflows/release.yml | 7 +++++ .releaserc | 2 +- build.gradle.kts | 53 ++++++++++++++++++++--------------- 3 files changed, 38 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 970ac34d8b..9c384f380e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,6 +41,13 @@ jobs: - name: Install dependencies run: npm install + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + fingerprint: ${{ env.GPG_FINGERPRINT }} + - name: Release env: GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }} diff --git a/.releaserc b/.releaserc index 0e4fa8b8aa..6193511b8e 100644 --- a/.releaserc +++ b/.releaserc @@ -33,7 +33,7 @@ { "assets": [ { - "path": "build/libs/*.jar" + "path": "build/libs/revanced-patches*" }, { "path": "patches.json" diff --git a/build.gradle.kts b/build.gradle.kts index 1db66cd753..d63c72177e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,6 +4,7 @@ plugins { alias(libs.plugins.kotlin) alias(libs.plugins.binary.compatibility.validator) `maven-publish` + signing } group = "your.org" @@ -24,49 +25,49 @@ kotlin { jvmToolchain(11) } -tasks.withType(Jar::class) { - manifest { - attributes["Name"] = "Your Patches" - attributes["Description"] = "Patches for ReVanced." - attributes["Version"] = version - attributes["Timestamp"] = System.currentTimeMillis().toString() - attributes["Source"] = "git@github.com:you/revanced-patches.git" - attributes["Author"] = "You" - attributes["Contact"] = "contact@your.homepage" - attributes["Origin"] = "https://your.homepage" - attributes["License"] = "GNU General Public License v3.0" +tasks { + withType(Jar::class) { + manifest { + attributes["Name"] = "Your Patches" + attributes["Description"] = "Patches for ReVanced." + attributes["Version"] = version + attributes["Timestamp"] = System.currentTimeMillis().toString() + attributes["Source"] = "git@github.com:you/revanced-patches.git" + attributes["Author"] = "You" + attributes["Contact"] = "contact@your.homepage" + attributes["Origin"] = "https://your.homepage" + attributes["License"] = "GNU General Public License v3.0" + } } -} -tasks { - register("generateBundle") { - description = "Generate DEX files and add them in the JAR file" - - dependsOn(build) + register("buildDexJar") { + description = "Build and add a DEX to the JAR file" + group = "build" doLast { val d8 = File(System.getenv("ANDROID_HOME")).resolve("build-tools") .listFilesOrdered().last().resolve("d8").absolutePath - val artifacts = configurations.archives.get().allArtifacts.files.files.first().absolutePath + val patchesJar = configurations.archives.get().allArtifacts.files.files.first().absolutePath val workingDirectory = layout.buildDirectory.dir("libs").get().asFile exec { workingDir = workingDirectory - commandLine = listOf(d8, artifacts) + commandLine = listOf(d8, patchesJar) } exec { workingDir = workingDirectory - commandLine = listOf("zip", "-u", artifacts, "classes.dex") + commandLine = listOf("zip", "-u", patchesJar, "classes.dex") } } } - // Required to run tasks because Gradle semantic-release plugin runs the publish task. + // Needed by gradle-semantic-release-plugin. // Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435 - named("publish") { - dependsOn("generateBundle") + publish { + dependsOn(build) + dependsOn("buildDexJar") } } @@ -102,3 +103,9 @@ publishing { } } } + +signing { + useGpgCmd() + sign(publishing.publications["revanced-patches-publication"]) + sign(configurations.archives.get()).first().dependsOn("buildDexJar") +} From c441a2ddf508456a47cbaab62533d884441c4e2d Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 20 Feb 2024 05:48:42 +0100 Subject: [PATCH 08/16] build: Publish to GitHub Packages --- build.gradle.kts | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d63c72177e..d76134acc9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,14 @@ repositories { mavenCentral() mavenLocal() google() - maven { url = uri("https://jitpack.io") } + maven { + // A repository must be speficied for some reason. "registry" is a dummy. + url = uri("https://maven.pkg.github.com/revanced/registry") + credentials { + username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR") + password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN") + } + } } dependencies { @@ -72,6 +79,17 @@ tasks { } publishing { + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/you/revanced-patches") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } + publications { create("revanced-patches-publication") { from(components["java"]) @@ -106,6 +124,6 @@ publishing { signing { useGpgCmd() + sign(publishing.publications["revanced-patches-publication"]) - sign(configurations.archives.get()).first().dependsOn("buildDexJar") } From 53a9627cb27ab7b540996b906701cebcd15b7668 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 20 Feb 2024 06:12:34 +0100 Subject: [PATCH 09/16] chore: Remove unnecessary dummy module --- dummy/build.gradle.kts | 9 --------- settings.gradle.kts | 4 +--- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 dummy/build.gradle.kts diff --git a/dummy/build.gradle.kts b/dummy/build.gradle.kts deleted file mode 100644 index 04b0d269d7..0000000000 --- a/dummy/build.gradle.kts +++ /dev/null @@ -1,9 +0,0 @@ -plugins { - id("java") -} - -java { - toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) - } -} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index f28af0545b..432b20014d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,9 +1,7 @@ -include("dummy") - rootProject.name = "revanced-patches" buildCache { local { - isEnabled = !System.getenv().containsKey("CI") + isEnabled = "CI" !in System.getenv() } } From 5454c33185f595bddb48f3cd5c162985efe943fc Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 20 Feb 2024 06:13:08 +0100 Subject: [PATCH 10/16] docs: Update README with corrected references and missing sections --- README.md | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 74a6bb92ed..f70c5ec863 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,15 @@ For an example repository, see [ReVanced Patches](https://github.com/revanced/re To start using this template, follow these steps: 1. [Create a new repository using this template](https://github.com/new?template_name=revanced-patches-template&template_owner=ReVanced) -2. Set up the [build.gradle.kts](build.gradle.kts) file (Match the [group of the project](build.gradle.kts#L8), [manifest attributes](build.gradle.kts#L35-L43), and the [POM](build.gradle.kts#L84-L106) that will be published to yours) -3. Update the dependencies in the [libs.versions.toml](gradle/libs.versions.toml) file -4. [Add a secret](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) to your repository named [REPOSITORY_PUSH_ACCESS](.github/workflows/release.yml#L47) containing a GitHub access token with [push access](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/ci-configuration.md#authentication) -5. Set up the [README.md](README.md) file[^1] (e.g, title, description, license, summary of the patches that are included in the repository) +2. Set up the [build.gradle.kts](build.gradle.kts) file (Specifically, the [group of the project](build.gradle.kts#L10), [manifest attributes](build.gradle.kts#L37-L47), and the [POM](build.gradle.kts#L98-L121)) +3. Update dependencies in the [libs.versions.toml](gradle/libs.versions.toml) file +4. [Create a pass-phrased GPG master key and subkey](https://mikeross.xyz/create-gpg-key-pair-with-subkeys/) + 1. Add the private key as a secret named [GPG_PRIVATE_KEY](.github/workflows/release.yml#L47) to your repository + 2. Add the passphrase as a secret named [GPG_PASSPHRASE](.github/workflows/release.yml#L48) to your repository + 3. Add the fingerprint of the GPG subkey as a secret named [GPG_FINGERPRINT](.github/workflows/release.yml#L49) to your repository +6. [Create a PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with [push access](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/ci-configuration.md#authentication) + 1. Add it as a secret named [REPOSITORY_PUSH_ACCESS](.github/workflows/release.yml#L53) to your repository +7. Set up the [README.md](README.md) file[^1] (e.g, title, description, license, summary of the patches that are included in the repository) 🎉 You are now ready to start creating patches! @@ -34,9 +39,21 @@ You can also add the following things to the repository: In order to develop and release ReVanced Patches using this template, some things need to be considered: -- Development originates in feature branches. Once a feature branch is ready, it is squshed and merged into the `dev` branch +- Development occurs in feature branches. Once a feature branch is ready, it is squshed and merged into the `dev` branch - The `dev` branch is merged into the `main` branch once it is ready for release - Semantic versioning is used for versioning ReVanced Patches. ReVanced Patches have a public API for other patches to use - Semantic commit messages are used for commits - Commits on the `dev` branch and `main` branch are automatically released via the [release.yml](.github/workflows/release.yml) workflow, which is also responsible for generating the changelog and updating the version of ReVanced Patches. It is triggered by pushing to the `dev` or `main` branch. The workflow uses the `publish` task to publish the release of ReVanced Patches -- In order to build ReVanced Patches, that can be used on Android, the [`generateBundle`](build.gradle.kts#L48-L70) task needs to be run. The [`publish` task depends on the `generateBundle`](build.gradle.kts#L74-L76) task, so it will be run automatically when publishing a release. +- In order to build ReVanced Patches, that can be used on Android, the [`buildDexJar`](build.gradle.kts#L50-L73) task needs to be run. The [`publish` task depends on the `buildDexJar`](build.gradle.kts#L78) task, so it will be run automatically when publishing a release. + +## 📚 Everything else + +### 🛠️ Building + +In order to build ReVanced Patches template, you can follow the [ReVanced documentation](https://github.com/ReVanced/revanced-documentation). + +## 📜 Licence + +ReVanced Patches template is licensed under the GPLv3 licence. Please see the [licence 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 template as long as you track changes/dates in source files. +Any modifications to ReVanced Patches template must also be made available under the GPL along with build & install instructions. From c9ef930a8c3cf1f29c9391fd32147b5a721b2ab0 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 20 Feb 2024 19:42:49 +0100 Subject: [PATCH 11/16] chore: Dump API --- api/revanced-patches.api | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 api/revanced-patches.api diff --git a/api/revanced-patches.api b/api/revanced-patches.api new file mode 100644 index 0000000000..2d3884728b --- /dev/null +++ b/api/revanced-patches.api @@ -0,0 +1,6 @@ +public final class your/org/patches/example/ExamplePatch : app/revanced/patcher/patch/BytecodePatch { + public static final field INSTANCE Lyour/org/patches/example/ExamplePatch; + public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V + public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V +} + From 73f6506bccc01e5622a6e19bedcf6d54d3f701c7 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 20 Feb 2024 19:48:36 +0100 Subject: [PATCH 12/16] fix: Compile DEX without debugging information --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index d76134acc9..01648e8a18 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -60,7 +60,7 @@ tasks { exec { workingDir = workingDirectory - commandLine = listOf(d8, patchesJar) + commandLine = listOf(d8, "--release", patchesJar) } exec { From ad21c695491aa73f3fe28e5ad3bff1d360ec5deb Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 21 Feb 2024 01:07:28 +0100 Subject: [PATCH 13/16] build: Remove non existing asset from being attempted to be uploaded --- .releaserc | 3 --- 1 file changed, 3 deletions(-) diff --git a/.releaserc b/.releaserc index 6193511b8e..2c9aca9c23 100644 --- a/.releaserc +++ b/.releaserc @@ -34,9 +34,6 @@ "assets": [ { "path": "build/libs/revanced-patches*" - }, - { - "path": "patches.json" } ], successComment: false From 6b7bbff623ea396f8b6a1e7dddfef74febc33ced Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 21 Feb 2024 02:05:37 +0100 Subject: [PATCH 14/16] build: Fix builds --- build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 01648e8a18..a21375374b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -51,6 +51,8 @@ tasks { description = "Build and add a DEX to the JAR file" group = "build" + dependsOn(build) + doLast { val d8 = File(System.getenv("ANDROID_HOME")).resolve("build-tools") .listFilesOrdered().last().resolve("d8").absolutePath @@ -73,7 +75,6 @@ tasks { // Needed by gradle-semantic-release-plugin. // Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435 publish { - dependsOn(build) dependsOn("buildDexJar") } } From ccb3d795846f9e103a181f06e1d7d3b35da05dc4 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 21 Feb 2024 01:30:47 +0000 Subject: [PATCH 15/16] chore(release): 1.0.1-dev.1 [skip ci] ## [1.0.1-dev.1](https://github.com/ReVanced/revanced-patches-template/compare/v1.0.0...v1.0.1-dev.1) (2024-02-21) ### Bug Fixes * Compile DEX without debugging information ([73f6506](https://github.com/ReVanced/revanced-patches-template/commit/73f6506bccc01e5622a6e19bedcf6d54d3f701c7)) --- CHANGELOG.md | 7 +++++++ gradle.properties | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af5fdba793..f3ca0c2eed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.0.1-dev.1](https://github.com/ReVanced/revanced-patches-template/compare/v1.0.0...v1.0.1-dev.1) (2024-02-21) + + +### Bug Fixes + +* Compile DEX without debugging information ([73f6506](https://github.com/ReVanced/revanced-patches-template/commit/73f6506bccc01e5622a6e19bedcf6d54d3f701c7)) + # 1.0.0 (2024-01-26) diff --git a/gradle.properties b/gradle.properties index 0cfc02d15b..663f56406b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ org.gradle.parallel = true org.gradle.caching = true kotlin.code.style = official -version = 1.0.0 +version = 1.0.1-dev.1 From 513bf5d57d73f9bb7f48673ffa2b9b09c5b2938b Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 21 Feb 2024 03:30:33 +0100 Subject: [PATCH 16/16] build: Adjust project information Use ReVanced project information instead of placeholders. This also fixes failing publication. --- api/revanced-patches-template.api | 6 ++++ api/revanced-patches.api | 6 ---- build.gradle.kts | 34 +++++++++---------- settings.gradle.kts | 2 +- .../revanced}/patches/example/ExamplePatch.kt | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 api/revanced-patches-template.api delete mode 100644 api/revanced-patches.api rename src/main/kotlin/{your/org => app/revanced}/patches/example/ExamplePatch.kt (93%) diff --git a/api/revanced-patches-template.api b/api/revanced-patches-template.api new file mode 100644 index 0000000000..8b4a865254 --- /dev/null +++ b/api/revanced-patches-template.api @@ -0,0 +1,6 @@ +public final class app/revanced/patches/example/ExamplePatch : app/revanced/patcher/patch/BytecodePatch { + public static final field INSTANCE Lapp/revanced/patches/example/ExamplePatch; + public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V + public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V +} + diff --git a/api/revanced-patches.api b/api/revanced-patches.api deleted file mode 100644 index 2d3884728b..0000000000 --- a/api/revanced-patches.api +++ /dev/null @@ -1,6 +0,0 @@ -public final class your/org/patches/example/ExamplePatch : app/revanced/patcher/patch/BytecodePatch { - public static final field INSTANCE Lyour/org/patches/example/ExamplePatch; - public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V - public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V -} - diff --git a/build.gradle.kts b/build.gradle.kts index a21375374b..267b63bcb6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { signing } -group = "your.org" +group = "app.revanced" repositories { mavenCentral() @@ -35,14 +35,14 @@ kotlin { tasks { withType(Jar::class) { manifest { - attributes["Name"] = "Your Patches" - attributes["Description"] = "Patches for ReVanced." + attributes["Name"] = "ReVanced Patches template" + attributes["Description"] = "Patches template for ReVanced." attributes["Version"] = version attributes["Timestamp"] = System.currentTimeMillis().toString() - attributes["Source"] = "git@github.com:you/revanced-patches.git" - attributes["Author"] = "You" - attributes["Contact"] = "contact@your.homepage" - attributes["Origin"] = "https://your.homepage" + attributes["Source"] = "git@github.com:revanced/revanced-patches-template.git" + attributes["Author"] = "ReVanced" + attributes["Contact"] = "contact@revanced.app" + attributes["Origin"] = "https://revanced.app" attributes["License"] = "GNU General Public License v3.0" } } @@ -83,7 +83,7 @@ publishing { repositories { maven { name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/you/revanced-patches") + url = uri("https://maven.pkg.github.com/revanced/revanced-patches-template") credentials { username = System.getenv("GITHUB_ACTOR") password = System.getenv("GITHUB_TOKEN") @@ -96,9 +96,9 @@ publishing { from(components["java"]) pom { - name = "Your Patches" - description = "Patches for ReVanced." - url = "https://your.homepage" + name = "ReVanced Patches template" + description = "Patches template for ReVanced." + url = "https://revanced.app" licenses { license { @@ -108,15 +108,15 @@ publishing { } developers { developer { - id = "Your ID" - name = "Your Name" - email = "contact@your.homepage" + id = "ReVanced" + name = "ReVanced" + email = "contact@revanced.app" } } scm { - connection = "scm:git:git://github.com/you/revanced-patches.git" - developerConnection = "scm:git:git@github.com:you/revanced-patches.git" - url = "https://github.com/you/revanced-patches" + connection = "scm:git:git://github.com/revanced/revanced-patches-template.git" + developerConnection = "scm:git:git@github.com:revanced/revanced-patches-template.git" + url = "https://github.com/revanced/revanced-patches-template" } } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 432b20014d..50d0be92b5 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,4 @@ -rootProject.name = "revanced-patches" +rootProject.name = "revanced-patches-template" buildCache { local { diff --git a/src/main/kotlin/your/org/patches/example/ExamplePatch.kt b/src/main/kotlin/app/revanced/patches/example/ExamplePatch.kt similarity index 93% rename from src/main/kotlin/your/org/patches/example/ExamplePatch.kt rename to src/main/kotlin/app/revanced/patches/example/ExamplePatch.kt index ab99017e6e..b4d00d7c25 100644 --- a/src/main/kotlin/your/org/patches/example/ExamplePatch.kt +++ b/src/main/kotlin/app/revanced/patches/example/ExamplePatch.kt @@ -1,4 +1,4 @@ -package your.org.patches.example +package app.revanced.patches.example import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch