Skip to content

Commit 1fb5d33

Browse files
author
luc0001r
committed
make configuration cache works without issues
1 parent e4c3bc7 commit 1fb5d33

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

gradle/java-publish.gradle

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,22 @@ model {
107107
artifactId project.ext.artifactId
108108
version project.version
109109

110+
def projectExtArtifactId = project.ext.artifactId
111+
def projectDescription = project.description
112+
def projectOrg = project.org
113+
def rootProjectName = rootProject.name
114+
110115
pom.withXml {
111116
// add MavenCentral requirements to the POM
112117
asNode().children().last() + {
113118
resolveStrategy = Closure.DELEGATE_FIRST
114-
name project.ext.artifactId
115-
description project.description
116-
url "https://github.com/${project.org}/${rootProject.name}"
119+
name projectExtArtifactId
120+
description projectDescription
121+
url "https://github.com/${projectOrg}/${rootProjectName}"
117122
scm {
118-
url "https://github.com/${project.org}/${rootProject.name}"
119-
connection "scm:git:https://github.com/${project.org}/${rootProject.name}.git"
120-
developerConnection "scm:git:ssh:git@github.com/${project.org}/${rootProject.name}.git"
123+
url "https://github.com/${projectOrg}/${rootProjectName}"
124+
connection "scm:git:https://github.com/${projectOrg}/${rootProjectName}.git"
125+
developerConnection "scm:git:ssh:git@github.com/${projectOrg}/${rootProjectName}.git"
121126
}
122127
licenses {
123128
if (isExt) {
@@ -188,13 +193,12 @@ if (System.env['JITPACK'] == 'true' || version.endsWith('-SNAPSHOT')) {
188193
dependsOn changelogTasks.named('changelogCheck')
189194
}
190195
// ensures that changelog bump and push only happens if the publish was successful
191-
def thisProj = project
192196
changelogTasks.named('changelogBump').configure {
193-
dependsOn ":${thisProj.path}:publishPluginMavenPublicationToSonatypeRepository"
197+
dependsOn project.path + ":publishPluginMavenPublicationToSonatypeRepository"
194198
dependsOn ":closeAndReleaseSonatypeStagingRepository"
195199
// if we have a Gradle plugin, we need to push it up to the plugin portal too
196-
if (thisProj.tasks.names.contains('publishPlugins')) {
197-
dependsOn thisProj.tasks.named('publishPlugins')
200+
if (project.tasks.names.contains('publishPlugins')) {
201+
dependsOn project.tasks.named('publishPlugins')
198202
}
199203
}
200204
}

plugin-maven/build.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ mavenPlugin {
1919
description = project.description
2020
}
2121

22-
tasks.withType(GenerateMavenPluginDescriptorTask).configureEach {
23-
notCompatibleWithConfigurationCache('https://github.com/britter/maven-plugin-development/issues/8')
24-
}
25-
tasks.withType(GenerateHelpMojoSourcesTask).configureEach {
26-
notCompatibleWithConfigurationCache('https://github.com/britter/maven-plugin-development/issues/8')
27-
}
28-
2922
String VER_MAVEN_API = '3.0'
3023
String VER_ECLIPSE_AETHER = '1.1.0'
3124
String VER_PLEXUS_RESOURCES = '1.3.0'

0 commit comments

Comments
 (0)