Skip to content

Commit

Permalink
refactor: Move ReVanced Library subproject to another repository
Browse files Browse the repository at this point in the history
This commit removes the subproject ReVanced Library and moves it to another repository. A monorepo turned out to be difficult to work with.
  • Loading branch information
oSumAtrIX committed Sep 23, 2023
1 parent 84b24f1 commit 995f2ec
Show file tree
Hide file tree
Showing 31 changed files with 73 additions and 1,692 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": "revanced-cli/build/libs/*all.jar"
"path": "build/libs/*all.jar"
}
],
successComment: false
Expand Down
64 changes: 60 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,63 @@
plugins {
kotlin("jvm") version "1.9.0" apply false
kotlin("jvm") version "1.9.0"
alias(libs.plugins.shadow)
}

allprojects {
group = "app.revanced"
}
group = "app.revanced"

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)
}
}
14 changes: 2 additions & 12 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
[versions]
shadow = "8.1.1"
apksig = "8.1.1"
bcpkix-jdk18on = "1.76"
jackson-module-kotlin = "2.14.3"
jadb = "2531a28109"
kotlin-reflect = "1.9.0"
kotlin-test = "1.8.20-RC"
kotlinx-coroutines-core = "1.7.3"
picocli = "4.7.3"
revanced-patcher = "15.0.1"
binary-compatibility-validator = "0.13.2"
revanced-library = "1.0.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 = "com.github.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" }
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" }
43 changes: 0 additions & 43 deletions revanced-cli/build.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion revanced-cli/settings.gradle.kts

This file was deleted.

140 changes: 0 additions & 140 deletions revanced-lib/api/revanced-lib.api

This file was deleted.

78 changes: 0 additions & 78 deletions revanced-lib/build.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion revanced-lib/settings.gradle.kts

This file was deleted.

Loading

0 comments on commit 995f2ec

Please sign in to comment.