Skip to content

Commit

Permalink
revert: Move ReVanced Library subproject to another repository 995f2ec
Browse files Browse the repository at this point in the history
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 2.2.1 into ReVanced CLI.
  • Loading branch information
E85Addict committed Mar 12, 2024
1 parent d5c2740 commit f6e264c
Show file tree
Hide file tree
Showing 25 changed files with 1,373 additions and 93 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*"
"path": "revanced-cli/build/libs/*-all*"
}
],
successComment: false
Expand Down
92 changes: 3 additions & 89 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,8 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.shadow)
application
`maven-publish`
signing
}

group = "app.revanced"

application {
mainClass = "app.revanced.cli.command.MainCommandKt"
}

repositories {
mavenCentral()
mavenLocal()
google()
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 {
implementation(libs.revanced.patcher)
implementation(libs.revanced.library)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.picocli)

testImplementation(libs.kotlin.test)
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}

java {
targetCompatibility = JavaVersion.VERSION_11
}

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

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

shadowJar {
minimize {
exclude(dependency("org.jetbrains.kotlin:.*"))
exclude(dependency("org.bouncycastle:.*"))
exclude(dependency("app.revanced:.*"))
}
}

publish {
dependsOn(shadowJar)
}
}

// Needed by gradle-semantic-release-plugin.
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435

// The maven-publish is also necessary to make the signing plugin work.
publishing {
repositories {
mavenLocal()
}

publications {
create<MavenPublication>("revanced-cli-publication") {
from(components["java"])
}
}
}

signing {
useGpgCmd()

sign(publishing.publications["revanced-cli-publication"])
}
allprojects {
group = "app.revanced"
}
15 changes: 13 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@ kotlin = "1.9.22"
kotlinx-coroutines-core = "1.7.3"
picocli = "4.7.5"
revanced-patcher = "19.3.1"
revanced-library = "2.2.1"
jackson-module-kotlin = "2.15.0"
jadb = "1.2.1"
apkzlib = "8.3.0"
bcpkix-jdk15on = "1.70"
guava = "33.0.0-jre"
apksig = "8.3.0"

[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
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" }
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" }
apkzlib = { module = "com.android.tools.build:apkzlib", version.ref = "apkzlib" }
bcpkix-jdk15on = { module = "org.bouncycastle:bcpkix-jdk15on", version.ref = "bcpkix-jdk15on" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
apksig = { module = "com.android.tools.build:apksig", version.ref = "apksig" }

[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
Expand Down
95 changes: 95 additions & 0 deletions revanced-cli/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.shadow)
application
`maven-publish`
signing
}

group = "app.revanced"

application {
mainClass = "app.revanced.cli.command.MainCommandKt"
}

repositories {
mavenCentral()
mavenLocal()
google()
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 {
implementation(libs.revanced.patcher)
implementation(project(":revanced-lib"))
implementation(libs.kotlinx.coroutines.core)
implementation(libs.picocli)

testImplementation(libs.kotlin.test)
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}

java {
targetCompatibility = JavaVersion.VERSION_11
}

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

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

shadowJar {
minimize {
exclude(dependency("org.jetbrains.kotlin:.*"))
exclude(dependency("org.bouncycastle:.*"))
exclude(dependency("app.revanced:.*"))
}
}

publish {
dependsOn(shadowJar)
}
}

// Needed by gradle-semantic-release-plugin.
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435

// The maven-publish is also necessary to make the signing plugin work.
publishing {
repositories {
mavenLocal()
}

publications {
create<MavenPublication>("revanced-cli-publication") {
from(components["java"])
}
}
}

signing {
useGpgCmd()

sign(publishing.publications["revanced-cli-publication"])
}
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"
73 changes: 73 additions & 0 deletions revanced-lib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.kotlin)
`maven-publish`
signing
}

group = "app.revanced"

repositories {
mavenCentral()
mavenLocal()
google()
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 {
implementation(libs.revanced.patcher)
implementation(libs.kotlin.reflect)
implementation(libs.jadb) // Fork with Shell v2 support.
implementation(libs.jackson.module.kotlin)
implementation(libs.apkzlib)
implementation(libs.apksig)
implementation(libs.bcpkix.jdk15on)
implementation(libs.guava)

testImplementation(libs.revanced.patcher)
testImplementation(libs.kotlin.test)
}

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

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}

java {
targetCompatibility = JavaVersion.VERSION_11
}

publishing {
repositories {
mavenLocal()
}

publications {
create<MavenPublication>("revanced-library-publication") {
from(components["java"])
}
}
}

signing {
useGpgCmd()
sign(publishing.publications["revanced-library-publication"])
}
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 f6e264c

Please sign in to comment.