Skip to content

Commit 2b29b20

Browse files
author
volker
committed
Adaptations for Gradle 9
1 parent 9486fc6 commit 2b29b20

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ env:
66
- LIB_GRADLE_VERSION=7.6 DEPLOY=true
77
- LIB_GRADLE_VERSION=8.4 DEPLOY=true
88
- LIB_GRADLE_VERSION=8.14.2
9+
- LIB_GRADLE_VERSION=9.0.0-milestone-9
910
global:
1011
# The next declaration is the encrypted gradlePublishKey
1112
- secure: tzRoJbjW38G0YcSRuf53+koo/ZixIrA1vHJ9StOfafZOJzKyoASkbFa2EpUKmp3CXBWvUSTVo59j7ywUSyWW+L+G+CRnYqkDTktySJ/LAHjR0CH5dJCUodwcwtZkBje/RQZ//ZuPO2I7wY/aqHfj/E8pg2h9Y+nOd2v9R904/5b5gck9nM1Tr74YE2dJDm3h0QKrMqx6/oT7KVTWQpTNeLxcdrdNn5yxllqn4YDF70gEksoSuJeFR2l5lwSlTTseKI7Q7mGYI1Tg/PSZoxlPz3DGFmSe+9sewRnN9ZnjQDEY06/GmrGQHGv9MV1azvenlFHrt9lIbHnEo0GBqxNpeFfMd4+B9oeEmL8roapNSq0TCgVvOzda/G5KyY8TgLEi+k7WrZaWGvbW+AorU5ntenWEzSWz3b5lpwnwXxrPyyRnaKd3R5mRYj+LL10hlHAiWpvXn+v6ptD2OunE6l3JEm+wln+6wZjJBqBhl1jsv3LOd5siezFGqqOzC6FN6UgkTZqsgMfROzoqklFv3Ko8fU4e6oo9VzI/cJGcFHFO4M+dOHyYZbKl8hfvi1Bf44UpYo914sdwmWGIAZ8J6V2xtCqTnyN1bi/EQuKAkE2400laduCt/rnGyR8IefcM6iFxjufR5jCXpXBhbQ0cQ//pUT0eW4ssjqKvt9RrJmt/Mew=

scripts/javapreprocessor.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ class JPPTask extends DefaultTask {
8080
def vd = parseDouble(varContent);
8181
def ld = parseDouble(lit);
8282
if ( var.toLowerCase().indexOf('version') > 0 ) {
83-
vd = VersionNumber.parse(varContent)
84-
ld = VersionNumber.parse(lit)
83+
vd = project.VersionNumber.parse(varContent)
84+
ld = project.VersionNumber.parse(lit)
8585
}
8686

8787
if (op.equals("=") || op.equals("==")) {

src/com/inet/gradle/setup/abstracts/SetupSources.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,13 @@ default CopySpec from( Object... arg0 ) {
175175
return getRootSpec().from( arg0 );
176176
}
177177

178-
/**
179-
* {@inheritDoc}
180-
*/
178+
/*//if gradleVersion < 9.0
181179
@Override
182180
@Internal
183181
default Integer getDirMode() {
184182
return getRootSpec().getDirMode();
185183
}
184+
*///endif
186185

187186
/**
188187
* {@inheritDoc}
@@ -202,14 +201,13 @@ default Set<String> getExcludes() {
202201
return getRootSpec().getExcludes();
203202
}
204203

205-
/**
206-
* {@inheritDoc}
207-
*/
204+
/*//if gradleVersion < 9.0
208205
@Override
209206
@Internal
210207
default Integer getFileMode() {
211208
return getRootSpec().getFileMode();
212209
}
210+
*///endif
213211

214212
/**
215213
* {@inheritDoc}
@@ -318,13 +316,12 @@ default void setCaseSensitive( boolean arg0 ) {
318316
getRootSpec().setCaseSensitive( arg0 );
319317
}
320318

321-
/**
322-
* {@inheritDoc}
323-
*/
319+
/*//if gradleVersion < 9.0
324320
@Override
325321
default CopyProcessingSpec setDirMode( Integer arg0 ) {
326322
return getRootSpec().setDirMode( arg0 );
327323
}
324+
*///endif
328325

329326
/**
330327
* {@inheritDoc}
@@ -342,13 +339,12 @@ default CopySpec setExcludes( Iterable<String> arg0 ) {
342339
return getRootSpec().setExcludes( arg0 );
343340
}
344341

345-
/**
346-
* {@inheritDoc}
347-
*/
342+
/*//if gradleVersion < 9.0
348343
@Override
349344
default CopyProcessingSpec setFileMode( Integer arg0 ) {
350345
return getRootSpec().setFileMode( arg0 );
351346
}
347+
*///endif
352348

353349
/**
354350
* {@inheritDoc}

src/com/inet/gradle/setup/dmg/OSXPrefPaneCreator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected OSXPrefPaneCreator( Dmg task, SetupBuilder setup, FileResolver fileRes
5858
ex.printStackTrace();
5959
throw new RuntimeException( ex );
6060
}
61-
gradleBuild.setBuildFile( new File( prefPaneSource, "build.gradle" ) );
61+
gradleBuild.setDir( prefPaneSource );
6262
} );
6363
gradleBuild.dependsOn( gradleBuildInit );
6464
}

testBuilds/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ buildscript {
55
}
66
}
77
dependencies {
8+
apply from: "${buildscript.sourceFile.parentFile.parentFile}/scripts/VersionNumber.gradle"
89
apply from: "${buildscript.sourceFile.parentFile.parentFile}/scripts/SetupBuilderVersion.gradle"
910
classpath 'de.inetsoftware:SetupBuilder:' + setupBuilderVersion()
1011
}
@@ -44,8 +45,8 @@ setupBuilder {
4445
from jar.outputs
4546

4647
bundleJre = 1.8
47-
sourceCompatibility = 1.8
48-
targetCompatibility = 1.8
48+
java.sourceCompatibility = 1.8
49+
java.targetCompatibility = 1.8
4950
mainClass = 'com.inet.testapplication.TestLauncher'
5051
mainJar = 'testBuilds.jar'
5152

@@ -110,16 +111,17 @@ msi.dependsOn jar
110111
import org.apache.tools.ant.taskdefs.condition.Os
111112
task preparePrefPane(type: GradleBuild) {
112113

113-
buildFile '../../SetupBuilderOSXPrefPane/build.gradle'
114+
buildDir = '../../SetupBuilderOSXPrefPane'
114115
tasks = ['clean', 'uploadArchives']
115116

116117
processResources.dependsOn 'preparePrefPane'
117118

118119
onlyIf {
119-
file(buildFile).exists() && Os.isFamily(Os.FAMILY_MAC)
120+
file('../../SetupBuilderOSXPrefPane/build.gradle').exists() && Os.isFamily(Os.FAMILY_MAC)
120121
}
121122
}
122123

124+
/** buildFile does not exits anymore
123125
// run the following task as a dependency to the "check"-task.
124126
task runAppBundlerTest(type: GradleBuild) {
125127
@@ -145,3 +147,4 @@ task runJNLPBundlerTest(type: GradleBuild) {
145147
file(buildFile).exists() && Os.isFamily(Os.FAMILY_MAC)
146148
}
147149
}
150+
*/

0 commit comments

Comments
 (0)