Skip to content

Commit 6642852

Browse files
wilkinsonaphilwebb
authored andcommitted
Minimize tasks run in ConventionsPluginTests
Update `ConventionsPluginTests` so that dependency resolution is not required. This provides a work-around for our currently failing Windows build. Closes gh-29490
1 parent 1b3d088 commit 6642852

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -105,14 +105,8 @@ void sourceJarIsBuilt() throws IOException {
105105
out.println("version = '1.2.3'");
106106
out.println("sourceCompatibility = '1.8'");
107107
out.println("description 'Test'");
108-
out.println("repositories {");
109-
out.println(" mavenCentral()");
110-
out.println("}");
111-
out.println("dependencies {");
112-
out.println(" implementation(platform(\"org.junit:junit-bom:5.6.0\"))");
113-
out.println("}");
114108
}
115-
runGradle("build");
109+
runGradle("assemble");
116110
File file = new File(this.projectDir, "/build/libs/" + this.projectDir.getName() + "-1.2.3-sources.jar");
117111
assertThat(file).exists();
118112
try (JarFile jar = new JarFile(file)) {
@@ -140,14 +134,8 @@ void javadocJarIsBuilt() throws IOException {
140134
out.println("version = '1.2.3'");
141135
out.println("sourceCompatibility = '1.8'");
142136
out.println("description 'Test'");
143-
out.println("repositories {");
144-
out.println(" mavenCentral()");
145-
out.println("}");
146-
out.println("dependencies {");
147-
out.println(" implementation(platform(\"org.junit:junit-bom:5.6.0\"))");
148-
out.println("}");
149137
}
150-
runGradle("build");
138+
runGradle("assemble");
151139
File file = new File(this.projectDir, "/build/libs/" + this.projectDir.getName() + "-1.2.3-javadoc.jar");
152140
assertThat(file).exists();
153141
try (JarFile jar = new JarFile(file)) {

0 commit comments

Comments
 (0)