Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from gradle:master #28

Merged
merged 9 commits into from
Jan 14, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ val Project.performanceBaselines: String?

val Project.performanceChannel: Provider<String>
get() = environmentVariable(PERFORMANCE_CHANNEL_ENV).orElse(provider {
val channelSuffix = if (OperatingSystem.current().isLinux) "" else "-${OperatingSystem.current().familyName.toLowerCase()}"
val channelSuffix = if (OperatingSystem.current().isLinux) "" else "-${OperatingSystem.current().familyName.lowercase()}"
"commits$channelSuffix-${buildBranch.get()}"
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ private static InvalidUserDataException invalidUserDataException(Object notation
}

private static boolean isWindowsRootDirectory(@Nullable String scheme) {
return scheme != null && scheme.length() == 2 && Character.isLetter(scheme.charAt(0)) && scheme.charAt(1) == ':' && OperatingSystem.current().isWindows();
return scheme != null && scheme.length() == 1 && Character.isLetter(scheme.charAt(0)) && OperatingSystem.current().isWindows();
}
}
3 changes: 0 additions & 3 deletions platforms/jvm/plugins-java-base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,3 @@ packageCycles {
}

integTest.usesJavadocCodeSnippets.set(true)
tasks.isolatedProjectsIntegTest {
enabled = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,19 @@ class JavaBasePluginIntegrationTest extends AbstractIntegrationSpec {
settingsFile << """
include 'main', 'tests'
"""
buildFile << """
project(':main') {
apply plugin: 'java'
}
project(':tests') {
apply plugin: 'java-base'
buildFile("main/build.gradle", """
apply plugin: 'java'
""")
buildFile("tests/build.gradle", """
apply plugin: 'java-base'
sourceSets {
unitTest {
}
}
dependencies {
unitTestImplementation project(':main')
}
}
"""
""")
file("main/src/main/java/Main.java") << """public class Main { }"""
file("tests/src/unitTest/java/Test.java") << """public class Test { Main main = null; }"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ default void fromDependencyCollector(DependencyCollector collector) {
* If multiple actions are supplied, each action will be executed until the set of dependencies is no longer empty.
* Remaining actions will be ignored.
*
* @implSpec Usage: This method should only be called on resolvable configurations and will emit a deprecation warning if
* @implSpec Usage: This method should only be called on declarable configurations and will emit a deprecation warning if
* called on a configuration that does not permit this usage, or has allowed this usage but marked it as deprecated.
*
* @param action the action to execute when the configuration has no defined dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package org.gradle.api.internal.file

import org.gradle.internal.typeconversion.UnsupportedNotationException
import org.gradle.test.fixtures.file.TestNameTestDirectoryProvider
import org.gradle.test.precondition.Requires
import org.gradle.test.preconditions.UnitTestPreconditions
import org.junit.Rule
import spock.lang.Issue
import spock.lang.Specification
Expand Down Expand Up @@ -124,6 +126,22 @@ class UriNotationConverterTest extends Specification {
showsProperMessage(e, 12)
}

@Requires(UnitTestPreconditions.Windows)
def "windows-like paths are treated as non-uris for #hint"() {
when:
parse(path)
then:
UnsupportedNotationException e = thrown()
showsProperMessage(e, path)

where:
path | hint
"C:\\some\\file" | "path without space"
"C:\\some\\file with space" | "path with space"
"c:/some/file" | "normalized path without space"
"c:/some/file with space" | "normalized path with space"
}

def parse(def value) {
return UriNotationConverter.parser().parseNotation(value)
}
Expand Down
Loading