| @@ -39,7 +39,7 test { | |||
|
|
39 | 39 | publishing { |
|
|
40 | 40 | repositories { |
|
|
41 | 41 | ivy { |
|
|
42 | url "${System.properties["user.home"]}/ivy-repo" | |
|
|
42 | url = "${System.properties["user.home"]}/ivy-repo" | |
|
|
43 | 43 | } |
|
|
44 | 44 | } |
|
|
45 | 45 | publications { |
|
|
1 | NO CONTENT: modified file, binary diff hidden |
| @@ -1,6 +1,6 | |||
|
|
1 | 1 | distributionBase=GRADLE_USER_HOME |
|
|
2 | 2 | distributionPath=wrapper/dists |
|
|
3 |
distributionUrl=https\://services.gradle.org/distributions/gradle- |
|
|
|
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip | |
|
|
4 | 4 | networkTimeout=10000 |
|
|
5 | 5 | validateDistributionUrl=true |
|
|
6 | 6 | zipStoreBase=GRADLE_USER_HOME |
| @@ -15,6 +15,8 | |||
|
|
15 | 15 | # See the License for the specific language governing permissions and |
|
|
16 | 16 | # limitations under the License. |
|
|
17 | 17 | # |
|
|
18 | # SPDX-License-Identifier: Apache-2.0 | |
|
|
19 | # | |
|
|
18 | 20 | |
|
|
19 | 21 | ############################################################################## |
|
|
20 | 22 | # |
| @@ -55,7 +57,7 | |||
|
|
55 | 57 | # Darwin, MinGW, and NonStop. |
|
|
56 | 58 | # |
|
|
57 | 59 | # (3) This script is generated from the Groovy template |
|
|
58 |
# https://github.com/gradle/gradle/blob/HEAD/ |
|
|
|
60 | # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt | |
|
|
59 | 61 | # within the Gradle project. |
|
|
60 | 62 | # |
|
|
61 | 63 | # You can find Gradle at https://github.com/gradle/gradle/. |
| @@ -84,7 +86,8 done | |||
|
|
84 | 86 | # shellcheck disable=SC2034 |
|
|
85 | 87 | APP_BASE_NAME=${0##*/} |
|
|
86 | 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) |
|
|
87 |
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && p |
|
|
|
89 | APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s | |
|
|
90 | ' "$PWD" ) || exit | |
|
|
88 | 91 | |
|
|
89 | 92 | # Use the maximum available, or set MAX_FD != -1 to use that value. |
|
|
90 | 93 | MAX_FD=maximum |
| @@ -13,6 +13,8 | |||
|
|
13 | 13 | @rem See the License for the specific language governing permissions and |
|
|
14 | 14 | @rem limitations under the License. |
|
|
15 | 15 | @rem |
|
|
16 | @rem SPDX-License-Identifier: Apache-2.0 | |
|
|
17 | @rem | |
|
|
16 | 18 | |
|
|
17 | 19 | @if "%DEBUG%"=="" @echo off |
|
|
18 | 20 | @rem ########################################################################## |
| @@ -13,7 +13,7 dependencyResolutionManagement { | |||
|
|
13 | 13 | mavenCentral() |
|
|
14 | 14 | mavenLocal() |
|
|
15 | 15 | ivy { |
|
|
16 | url "${System.properties["user.home"]}/ivy-repo" | |
|
|
16 | url = "${System.properties["user.home"]}/ivy-repo" | |
|
|
17 | 17 | } |
|
|
18 | 18 | } |
|
|
19 | 19 | } |
| @@ -43,7 +43,7 javadoc { | |||
|
|
43 | 43 | publishing { |
|
|
44 | 44 | repositories { |
|
|
45 | 45 | ivy { |
|
|
46 | url "${System.properties["user.home"]}/ivy-repo" | |
|
|
46 | url = "${System.properties["user.home"]}/ivy-repo" | |
|
|
47 | 47 | } |
|
|
48 | 48 | } |
|
|
49 | 49 | publications { |
| @@ -9,6 +9,7 import java.nio.file.Path; | |||
|
|
9 | 9 | import java.util.LinkedHashSet; |
|
|
10 | 10 | import java.util.List; |
|
|
11 | 11 | import java.util.stream.Collectors; |
|
|
12 | import java.util.regex.Pattern; | |
|
|
12 | 13 | |
|
|
13 | 14 | import org.gradle.testkit.runner.GradleRunner; |
|
|
14 | 15 | import org.gradle.testkit.runner.UnexpectedBuildFailure; |
| @@ -19,6 +20,8 import org.junit.jupiter.api.io.TempDir; | |||
|
|
19 | 20 | abstract class AbstractFunctionalTest { |
|
|
20 | 21 | private static final String SETTINGS_FILE = "settings.gradle"; |
|
|
21 | 22 | private static final String BUILD_FILE = "build.gradle"; |
|
|
23 | private static final Pattern INCLUDE_DECLARATION = Pattern.compile("^include(?:\\s|\\().*"); | |
|
|
24 | private static final Pattern QUOTED_LITERAL = Pattern.compile("['\"]([^'\"]+)['\"]"); | |
|
|
22 | 25 | |
|
|
23 | 26 | @TempDir |
|
|
24 | 27 | Path testProjectDir; |
| @@ -94,5 +97,27 abstract class AbstractFunctionalTest { | |||
|
|
94 | 97 | Path path = testProjectDir.resolve(relativePath); |
|
|
95 | 98 | Files.createDirectories(path.getParent()); |
|
|
96 | 99 | Files.writeString(path, content); |
|
|
100 | ||
|
|
101 | if (SETTINGS_FILE.equals(relativePath)) | |
|
|
102 | ensureIncludedProjectDirectories(content); | |
|
|
103 | } | |
|
|
104 | ||
|
|
105 | private void ensureIncludedProjectDirectories(String settingsContent) throws IOException { | |
|
|
106 | for (var line : settingsContent.split("\\R")) { | |
|
|
107 | var trimmed = line.strip(); | |
|
|
108 | if (!INCLUDE_DECLARATION.matcher(trimmed).matches()) | |
|
|
109 | continue; | |
|
|
110 | ||
|
|
111 | var matcher = QUOTED_LITERAL.matcher(trimmed); | |
|
|
112 | while (matcher.find()) { | |
|
|
113 | var projectPath = matcher.group(1); | |
|
|
114 | if (projectPath.startsWith(":")) | |
|
|
115 | projectPath = projectPath.substring(1); | |
|
|
116 | if (projectPath.isBlank()) | |
|
|
117 | continue; | |
|
|
118 | ||
|
|
119 | Files.createDirectories(testProjectDir.resolve(projectPath.replace(':', File.separatorChar))); | |
|
|
97 | 120 | } |
|
|
98 | 121 | } |
|
|
122 | } | |
|
|
123 | } | |
| @@ -103,9 +103,7 class VariantArtifactsPluginFunctionalTe | |||
|
|
103 | 103 | } |
|
|
104 | 104 | |
|
|
105 | 105 | @Test |
|
|
106 |
void gradleReferenceRegisteredSecondaryArtifactVariant |
|
|
|
107 | // Gradle issue: https://github.com/gradle/gradle/issues/27441 | |
|
|
108 | // Registered outgoing artifact variants are not realized before dependency resolution. | |
|
|
106 | void gradleReferenceRegisteredSecondaryArtifactVariantAllowsSecondaryArtifactSelection() throws Exception { | |
|
|
109 | 107 | writeFile("settings.gradle", """ |
|
|
110 | 108 | rootProject.name = 'gradle-reference-registered-secondary-variant' |
|
|
111 | 109 | include 'producer', 'consumer' |
| @@ -166,8 +164,10 class VariantArtifactsPluginFunctionalTe | |||
|
|
166 | 164 | } |
|
|
167 | 165 | """); |
|
|
168 | 166 | |
|
|
169 | assertBuildFails("Cannot create variant 'js' after dependency configuration ':producer:browserElements' has been resolved", | |
|
|
170 | ":consumer:probe"); | |
|
|
167 | BuildResult result = runner(":consumer:probe").build(); | |
|
|
168 | ||
|
|
169 | assertTrue(result.getOutput().contains("compileFiles=typesPackage")); | |
|
|
170 | assertTrue(result.getOutput().contains("jsFiles=js")); | |
|
|
171 | 171 | } |
|
|
172 | 172 | |
|
|
173 | 173 | @Test |
General Comments 0
You need to be logged in to leave comments.
Login now
