Skip to content

Commit

Permalink
remove extraneous config
Browse files Browse the repository at this point in the history
  • Loading branch information
John Engelman committed Feb 26, 2023
1 parent 226368f commit 1a57c16
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 46 deletions.
52 changes: 25 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id 'groovy'
id 'project-report'
id 'idea'
id 'java-gradle-plugin'
id 'signing'
// id 'signing'
id 'com.gradle.plugin-publish' version '1.1.0'
id 'org.ajoberstar.git-publish' version '4.1.1'
id 'com.github.node-gradle.node' version '3.5.1'
Expand Down Expand Up @@ -42,15 +41,18 @@ test {
systemProperty 'java.io.tmpdir', buildDir.absolutePath
}

jar {
from rootProject.file('LICENSE')
from rootProject.file('NOTICE')
}
// jar {
// from rootProject.file('LICENSE')
// from rootProject.file('NOTICE')
// }

jar.enabled = false
// jar.enabled = false

shadowJar {
archiveClassifier = ''
from rootProject.file('LICENSE')
from rootProject.file('NOTICE')
enableRelocation true
// archiveClassifier = ''
}

idea {
Expand All @@ -71,22 +73,18 @@ tasks.register('downloadDependencies', Exec) {
commandLine 'echo', 'Downloaded all dependencies'
}

tasks.named('build') { dependsOn tasks.named('shadowJar') }

tasks.withType(JavaCompile).configureEach {
// This will be the default in Gradle 5.0
if (!options.compilerArgs.contains("-processor")) {
options.compilerArgs << '-proc:none'
}
}

tasks.withType(GroovyCompile).configureEach {
// This will be the default in Gradle 5.0
if (!options.compilerArgs.contains("-processor")) {
options.compilerArgs << '-proc:none'
}
}

tasks.named('shadowJar', ShadowJar) {
enableRelocation true
}
// tasks.named('build') { dependsOn tasks.named('shadowJar') }

// tasks.withType(JavaCompile).configureEach {
// // This will be the default in Gradle 5.0
// if (!options.compilerArgs.contains("-processor")) {
// options.compilerArgs << '-proc:none'
// }
// }

// tasks.withType(GroovyCompile).configureEach {
// // This will be the default in Gradle 5.0
// if (!options.compilerArgs.contains("-processor")) {
// options.compilerArgs << '-proc:none'
// }
// }
38 changes: 19 additions & 19 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ if (System.env.CIRCLE_TAG && System.env.CIRCLE_TAG =~ /^\d\.\d\.\d$/) {
}
}

tasks.configureEach {
if (name == "publishPluginJar" || name == "generateMetadataFileForPluginMavenPublication") {
dependsOn(tasks.named("shadowJar"))
}
}
// tasks.configureEach {
// if (name == "publishPluginJar" || name == "generateMetadataFileForPluginMavenPublication") {
// dependsOn(tasks.named("shadowJar"))
// }
// }

gradlePlugin {
website = 'https://github.com/johnrengelman/shadow'
Expand All @@ -41,20 +41,20 @@ tasks.named('publishPlugins') {
notCompatibleWithConfigurationCache("https://github.com/gradle/gradle/issues/21283")
}

signing {
if (System.env.CI == 'true') {
def encodedSigningKey = findProperty("signingKey")
def signingKey = encodedSigningKey ? new String(encodedSigningKey.decodeBase64()) : null
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
}
required = gradle.taskGraph.hasTask("artifactoryPublish")
sign(publishing.publications)
}

tasks.withType(Sign).configureEach {
notCompatibleWithConfigurationCache("https://github.com/gradle/gradle/issues/13470")
}
// signing {
// if (System.env.CI == 'true') {
// def encodedSigningKey = findProperty("signingKey")
// def signingKey = encodedSigningKey ? new String(encodedSigningKey.decodeBase64()) : null
// def signingPassword = findProperty("signingPassword")
// useInMemoryPgpKeys(signingKey, signingPassword)
// }
// required = gradle.taskGraph.hasTask("artifactoryPublish")
// sign(publishing.publications)
// }

// tasks.withType(Sign).configureEach {
// notCompatibleWithConfigurationCache("https://github.com/gradle/gradle/issues/13470")
// }

This comment has been minimized.

Copy link
@Goooler

Goooler Feb 26, 2023

Member

No need to sign?


tasks.register('release') {
dependsOn 'assemble', 'publishPlugins', 'gitPublishPush'
Expand Down

0 comments on commit 1a57c16

Please sign in to comment.