Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions ant/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
id 'java'
id 'maven-publish'
}
Expand All @@ -15,21 +15,17 @@ dependencies {
implementation(libs.ant)
}

def fatJar = tasks.register("fatJar", ShadowJar) {
tasks.named('shadowJar', ShadowJar) {
destinationDirectory.set(file("$rootDir/lib"))
archiveFileName.set('proguard-ant.jar')
from sourceSets.main.output
configurations = [project.configurations.runtimeClasspath]
manifest {
attributes(
'Manifest-Version': '1.0',
'Multi-Release': true,
'Implementation-Version': archiveVersion.get())
'Implementation-Version': archiveVersion.get(),
)
}
}

assemble.dependsOn fatJar

afterEvaluate {
publishing {
publications.named(project.name) {
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
id 'io.github.gradle-nexus.publish-plugin'
id 'signing'
alias(libs.plugins.kotlin.jvm) apply(false)
id "com.gradleup.shadow" version "9.1.0" apply false
}

allprojects {
Expand Down Expand Up @@ -170,7 +171,7 @@ distributions {
project(":retrace"),
project(":ant"),
]
from(distProjects.collect { it.tasks.named { it == "fatJar" } })
from(distProjects.collect { it.tasks.named { it == "shadowJar" } })
}
into('docs') {
from('docs/md') {
Expand Down
12 changes: 6 additions & 6 deletions gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
id 'java-gradle-plugin'
id 'org.jetbrains.kotlin.jvm'
id 'maven-publish'
Expand Down Expand Up @@ -53,20 +53,20 @@ test {

def localRepo = file("$buildDir/local-repo")

def fatJar = tasks.register("fatJar", ShadowJar) {
def shadowJar = tasks.named('shadowJar', ShadowJar) {
destinationDirectory.set(localRepo)
archiveFileName.set("proguard-gradle-${version}.jar")
from sourceSets.main.output
configurations = [project.configurations.fatJar]
configurations = provider { [project.configurations.fatJar] }
manifest {
attributes(
'Main-Class': 'proguard.ProGuard',
'Implementation-Version': archiveVersion.get())
'Implementation-Version': archiveVersion.get(),
)
}
}

tasks.withType(Test).configureEach {
dependsOn fatJar
dependsOn shadowJar
systemProperty "local.repo", localRepo.toURI()
systemProperty "proguard.version", version
systemProperty "agp.version", libs.versions.agp.get()
Expand Down
12 changes: 4 additions & 8 deletions gui/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
id 'java'
id 'maven-publish'
}
Expand All @@ -17,22 +17,18 @@ dependencies {
implementation 'org.apache.logging.log4j:log4j-core:2.24.2'
}

def fatJar = tasks.register("fatJar", ShadowJar) {
tasks.named('shadowJar', ShadowJar) {
destinationDirectory.set(file("$rootDir/lib"))
archiveFileName.set('proguardgui.jar')
from sourceSets.main.output
configurations = [project.configurations.runtimeClasspath]
manifest {
attributes(
'Manifest-Version': '1.0',
'Main-Class': 'proguard.gui.ProGuardGUI',
'Multi-Release': true,
'Implementation-Version': archiveVersion.get())
'Implementation-Version': archiveVersion.get(),
)
}
}

assemble.dependsOn fatJar

afterEvaluate {
publishing {
publications.named(project.name) {
Expand Down
14 changes: 7 additions & 7 deletions proguard-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
id 'java'
id 'application'
}
Expand All @@ -10,23 +10,23 @@ repositories {
mavenCentral()
}

application {
mainClass = 'proguard.ProGuard'
}

dependencies {
implementation project(':base')
}

jar.manifest.attributes('Implementation-Version': version)

def fatJar = tasks.register("fatJar",ShadowJar) {
mainClassName = 'proguard.ProGuard'
tasks.named('shadowJar', ShadowJar) {
destinationDirectory.set(file("$rootDir/lib"))
archiveFileName.set('proguard.jar')
configurations = [project.configurations.runtimeClasspath]
manifest {
attributes(
'Main-Class': 'proguard.ProGuard',
'Multi-Release': true,
'Implementation-Version': archiveVersion.get())
)
}
}

assemble.dependsOn fatJar
12 changes: 4 additions & 8 deletions retrace/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
id 'java'
id 'maven-publish'
}
Expand All @@ -14,21 +14,17 @@ dependencies {
implementation project(':base')
}

def fatJar = tasks.register("fatJar", ShadowJar) {
tasks.named('shadowJar', ShadowJar) {
destinationDirectory.set(file("$rootDir/lib"))
archiveFileName.set('retrace.jar')
from sourceSets.main.output
configurations = [project.configurations.runtimeClasspath]
manifest {
attributes(
'Manifest-Version': '1.0',
'Multi-Release': true,
'Main-Class': 'proguard.retrace.ReTrace')
'Main-Class': 'proguard.retrace.ReTrace',
)
}
}

assemble.dependsOn fatJar

afterEvaluate {
publishing {
publications.named(project.name) {
Expand Down
3 changes: 0 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == 'com.github.johnrengelman.shadow') {
useVersion '8.1.1'
}
if (requested.id.id == 'io.github.gradle-nexus.publish-plugin') {
useVersion '2.0.0'
}
Expand Down
Loading