diff --git a/revanced-cli/build.gradle.kts b/revanced-cli/build.gradle.kts index 3912e5f..e9e54f6 100644 --- a/revanced-cli/build.gradle.kts +++ b/revanced-cli/build.gradle.kts @@ -4,6 +4,8 @@ plugins { } dependencies { + implementation(project(":revanced-lib")) + implementation(libs.revanced.patcher) implementation(libs.kotlin.reflect) implementation(libs.kotlinx.coroutines.core) diff --git a/revanced-cli/settings.gradle.kts b/revanced-cli/settings.gradle.kts new file mode 100644 index 0000000..028b7bc --- /dev/null +++ b/revanced-cli/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "revanced-cli" \ No newline at end of file diff --git a/revanced-lib/build.gradle.kts b/revanced-lib/build.gradle.kts new file mode 100644 index 0000000..63c2c30 --- /dev/null +++ b/revanced-lib/build.gradle.kts @@ -0,0 +1,69 @@ +plugins { + kotlin("jvm") version "1.9.0" + `maven-publish` +} + +dependencies { + testImplementation(libs.kotlin.test) +} + +kotlin { jvmToolchain(11) } + +java { + withSourcesJar() +} + +tasks { + test { + useJUnitPlatform() + testLogging { + events("PASSED", "SKIPPED", "FAILED") + } + } +} + +publishing { + repositories { + mavenLocal() + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/revanced/revanced-cli") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } + publications { + create("gpr") { + from(components["java"]) + + version = project.version.toString() + + pom { + name = "ReVanced Library" + description = "Library for ReVanced" + url = "https://revanced.app" + + licenses { + license { + name = "GNU General Public License v3.0" + url = "https://www.gnu.org/licenses/gpl-3.0.en.html" + } + } + developers { + developer { + id = "ReVanced" + name = "ReVanced" + email = "contact@revanced.app" + } + } + scm { + connection = "scm:git:git://github.com/revanced/revanced-cli.git" + developerConnection = "scm:git:git@github.com:revanced/revanced-cli.git" + url = "https://github.com/revanced/revanced-cli" + } + } + } + } +} \ No newline at end of file diff --git a/revanced-lib/settings.gradle.kts b/revanced-lib/settings.gradle.kts new file mode 100644 index 0000000..f1bcd72 --- /dev/null +++ b/revanced-lib/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "revanced-lib" \ No newline at end of file diff --git a/revanced-lib/src/main/resources/app/revanced/lib/version.properties b/revanced-lib/src/main/resources/app/revanced/lib/version.properties new file mode 100644 index 0000000..308c9f8 --- /dev/null +++ b/revanced-lib/src/main/resources/app/revanced/lib/version.properties @@ -0,0 +1 @@ +version=${projectVersion} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 01e6885..3225d82 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -20,4 +20,4 @@ dependencyResolutionManagement { } } -include("revanced-cli") +include("revanced-cli", "revanced-lib") \ No newline at end of file