Skip to content

Commit

Permalink
drop shadow plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
shaikhu committed May 12, 2024
1 parent 52c210a commit a524bc6
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation

plugins {
id 'java-gradle-plugin'
id 'maven-publish'
id 'signing'
id 'net.researchgate.release' version '3.0.0'
id 'io.codearte.nexus-staging' version '0.30.0'
id 'com.gradle.plugin-publish' version '0.21.0'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}

apply from: 'gradle/integration-test.gradle'
Expand Down Expand Up @@ -49,31 +46,13 @@ jar {
}
}

shadowJar {
mergeServiceFiles()
archiveClassifier.set('')
}

task relocateShadowJar(type: ConfigureShadowRelocation) {
target = tasks.shadowJar
}

tasks.shadowJar.dependsOn tasks.relocateShadowJar

artifacts {
archives shadowJar
}

allprojects {
repositories {
mavenCentral()
}
}

dependencies {
shadow localGroovy()
shadow gradleApi()

implementation ("com.sonatype.nexus:nexus-platform-api:$nexusPlatformApiVersion") {
exclude group: 'org.eclipse.jgit', module: 'org.eclipse.jgit'
}
Expand All @@ -89,11 +68,6 @@ dependencies {
testImplementation "org.powermock:powermock-api-mockito2:$powermockVersion"
}

// Remove the gradleApi so it isn't merged into the jar file when applying 'shadow'
configurations.named(JavaPlugin.API_CONFIGURATION_NAME) {
dependencies.remove(project.dependencies.gradleApi())
}

processResources {
filesMatching('com/sonatype/insight/client.properties') {
expand(project.properties)
Expand All @@ -104,14 +78,6 @@ test {
maxHeapSize = '512m'
}

sourceSets {
test {
// Groovy and Gradle libraries on the new shadow configuration need to be available for tests
compileClasspath = configurations.shadow + compileClasspath
runtimeClasspath = configurations.shadow + runtimeClasspath
}
}

publishing {
afterEvaluate {
def pluginUrl = 'https://github.com/sonatype-nexus-community/scan-gradle-plugin'
Expand Down

0 comments on commit a524bc6

Please sign in to comment.