Skip to content

Commit e14db26

Browse files
committed
Bump dogfood spotless to latest, which required some tweaks to spotles-freshmark.
1 parent 81978b3 commit e14db26

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

gradle/spotless-freshmark.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,16 @@ spotless {
4949
}
5050
}
5151

52+
def versionLast = spotlessChangelog.versionLast
53+
def versionNext = spotlessChangelog.versionNext
54+
5255
// if this freshmark has a changelog file, then it has version-sensitive content
5356
if (tasks.names.contains('changelogCheck')) {
5457
// normally we use versionLast for our freshmark
5558
spotless {
5659
freshmark {
5760
properties {
58-
it.put('versionLast', spotlessChangelog.versionLast)
61+
it.put('versionLast', versionLast)
5962
}
6063
}
6164
}
@@ -65,7 +68,7 @@ if (tasks.names.contains('changelogCheck')) {
6568
freshmarkSetup.execute(freshmark)
6669
freshmark.properties {
6770
// that uses versionNext as versionLast
68-
it.put('versionLast', spotlessChangelog.versionNext)
71+
it.put('versionLast', versionNext)
6972
}
7073
def changelogBumpFreshmark = freshmark.createIndependentApplyTask('changelogBumpFreshmark')
7174
// freshmark should run after the changelog bump

gradle/spotless.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spotless {
88
*/
99
String regex = "import org\\.gradle\\.api\\.internal\\.(?!plugins\\.DslObject)(?!project\\.ProjectInternal)"
1010
if ((text.contains('import org.gradle.internal.') || text.find(regex)) &&
11-
!text.contains('def noInternalDepsClosure')) {
11+
!text.contains('def noInternalDepsClosure')) {
1212
throw new AssertionError("Accidental internal import")
1313
}
1414
}

settings.gradle

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
pluginManagement {
22
plugins {
3-
// We are stuck dogfooding at 5.5.0 for a very strange reason:
4-
// 5.8.0+ Cannot get property 'versionLast' on null object @ spotless-freshmark.gradle:58
5-
// 5.6.0+ Tried to add format named 'freshmark' of type class @ spotless-freshmark.gradle:55
6-
id 'com.diffplug.spotless' version '5.5.1'
3+
id 'com.diffplug.spotless' version '5.17.1'
74
// https://github.com/diffplug/goomph/blob/main/CHANGES.md
85
id 'com.diffplug.eclipse.resourcefilters' version '3.33.2'
96
// https://plugins.gradle.org/plugin/com.gradle.plugin-publish
@@ -102,10 +99,10 @@ if (getStartProperty('com.diffplug.spotless.include.ext.nop2') == 'true') {
10299

103100
// the p2-based projects are too expensive for routine CI builds, so they have to be invoked explicitly
104101
for (kind in [
105-
'cdt',
106-
'groovy',
107-
'wtp'
108-
]) {
102+
'cdt',
103+
'groovy',
104+
'wtp'
105+
]) {
109106
if (getStartProperty("com.diffplug.spotless.include.ext.${kind}") == 'true') {
110107
include "eclipse-${kind}"
111108
project(":eclipse-${kind}").projectDir = file("_ext/eclipse-${kind}")

0 commit comments

Comments
 (0)