Skip to content

Commit

Permalink
perf: rollback: Move ReVanced Library subproject to another repository
Browse files Browse the repository at this point in the history
…995f2ec

This commit is to apply changes to the ReVanced Library.

Ideally I would create a new ReVanced Library fork and add my changes there.
In that case, in order to use github actions, there will be the inconvenience of having to release a new fork in Maven Central.

To prevent this I merge ReVanced Library 1.5.0 into ReVanced CLI.
  • Loading branch information
E85Addict committed Dec 31, 2023
1 parent 3c26457 commit fdff53d
Show file tree
Hide file tree
Showing 29 changed files with 1,699 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{
"assets": [
{
"path": "build/libs/*all.jar"
"path": "revanced-cli/build/libs/*all.jar"
}
],
successComment: false
Expand Down
71 changes: 4 additions & 67 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,70 +1,7 @@
plugins {
kotlin("jvm") version "1.9.10"
alias(libs.plugins.shadow)
kotlin("jvm") version "1.9.22" apply false
}

group = "app.revanced"

repositories {
mavenCentral()
mavenLocal()
google()
maven { url = uri("https://jitpack.io") }
}

dependencies {
implementation(libs.revanced.patcher)
implementation(libs.revanced.library)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.picocli)

testImplementation(libs.kotlin.test)
}

kotlin { jvmToolchain(11) }

tasks {
test {
useJUnitPlatform()
testLogging {
events("PASSED", "SKIPPED", "FAILED")
}
}

processResources {
expand("projectVersion" to project.version)
}

shadowJar {
manifest {
attributes("Main-Class" to "app.revanced.cli.command.MainCommandKt")
}
minimize {
exclude(dependency("org.jetbrains.kotlin:.*"))
exclude(dependency("org.bouncycastle:.*"))
exclude(dependency("app.revanced:.*"))
}
}

build {
dependsOn(shadowJar)
}

/*
Dummy task to hack gradle-semantic-release-plugin to release this project.
Explanation:
SemVer is a standard for versioning libraries.
For that reason the semantic-release plugin uses the "publish" task to publish libraries.
However, this subproject is not a library, and the "publish" task is not available for this subproject.
Because semantic-release is not designed to handle this case, we need to hack it.
RE: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
*/

register<DefaultTask>("publish") {
group = "publishing"
description = "Dummy task to hack gradle-semantic-release-plugin to release ReVanced CLI"
dependsOn(build)
}
}
allprojects {
group = "app.revanced"
}
16 changes: 12 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
[versions]
shadow = "8.1.1"
kotlin-test = "1.9.20"
apksig = "8.2.0"
bcpkix-jdk18on = "1.76"
jackson-module-kotlin = "2.16.1"
jadb = "1.2.1"
kotlin-reflect = "1.9.22"
kotlin-test = "1.9.22"
kotlinx-coroutines-core = "1.7.3"
picocli = "4.7.3"
picocli = "4.7.5"
revanced-patcher = "19.1.0"
revanced-library = "1.4.0"

[libraries]
apksig = { module = "com.android.tools.build:apksig", version.ref = "apksig" }
bcpkix-jdk18on = { module = "org.bouncycastle:bcpkix-jdk18on", version.ref = "bcpkix-jdk18on" }
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson-module-kotlin" }
jadb = { module = "app.revanced:jadb", version.ref = "jadb" }
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin-reflect" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-test" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" }
picocli = { module = "info.picocli:picocli", version.ref = "picocli" }
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
revanced-library = { module = "app.revanced:revanced-library", version.ref = "revanced-library" }

[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
52 changes: 52 additions & 0 deletions revanced-cli/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
plugins {
kotlin("jvm") version "1.9.22"
alias(libs.plugins.shadow)
}

dependencies {
implementation(project(":revanced-lib"))
implementation(libs.revanced.patcher)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.picocli)

testImplementation(libs.kotlin.test)
}

kotlin { jvmToolchain(11) }

tasks {
test {
useJUnitPlatform()
testLogging {
events("PASSED", "SKIPPED", "FAILED")
}
}

processResources {
expand("projectVersion" to project.version)
}

shadowJar {
manifest {
attributes("Main-Class" to "app.revanced.cli.command.MainCommandKt")
}
minimize {
exclude(dependency("org.jetbrains.kotlin:.*"))
exclude(dependency("org.bouncycastle:.*"))
exclude(dependency("app.revanced:.*"))
}
}

build {
dependsOn(shadowJar)
}

// Dummy task to fix the Gradle semantic-release plugin.
// Remove this if you forked it to support building only.
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
register<DefaultTask>("publish") {
group = "publish"
description = "Dummy task"
dependsOn(build)
}
}
1 change: 1 addition & 0 deletions revanced-cli/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "revanced-cli"
21 changes: 21 additions & 0 deletions revanced-lib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
kotlin("jvm") version "1.9.22"
}

dependencies {
implementation(libs.revanced.patcher)
implementation(libs.kotlin.reflect)
implementation(libs.jadb) // Updated fork
implementation(libs.apksig)
implementation(libs.bcpkix.jdk18on)
implementation(libs.jackson.module.kotlin)
}

tasks {
}

kotlin { jvmToolchain(11) }

java {
withSourcesJar()
}
1 change: 1 addition & 0 deletions revanced-lib/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "revanced-lib"
Loading

0 comments on commit fdff53d

Please sign in to comment.