Skip to content

Commit

Permalink
Merge branch 'simplify-generated-build' of https://github.com/grails/…
Browse files Browse the repository at this point in the history
…grails-forge into simplify-generated-build
  • Loading branch information
jamesfredley committed Nov 11, 2024
2 parents 2747012 + fad7db8 commit 7579cbb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CommandSpec extends Specification {
Process executeGradleCommand(String command) {
StringBuilder gradleCommand = new StringBuilder()
if (spock.util.environment.OperatingSystem.current.isWindows()) {
gradleCommand.append("gradlew.bat")
gradleCommand.append("cmd /c gradlew.bat")
} else {
gradleCommand.append("./gradlew")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,33 @@ class GradleSpec extends ApplicationContextSpec implements CommandOutputFixture
expect:
settingsGradle.contains("rootProject.name")
}

void "test buildSrc/build.gradle"() {
given:
def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ["gradle-build-src"])
String buildSrcGradle = output["buildSrc/build.gradle"]

expect:
buildSrcGradle
buildSrcGradle.contains('repositories')
buildSrcGradle.contains('dependencies')
}

void "no settings.gradle file is created without the 'gradle-settings-file' feature"() {
given:
def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11))
String settingsGradle = output["settings.gradle"]

expect:
!settingsGradle
}

void "no buildSrc/build.gradle file is created without the 'gradle-build-src' feature"() {
given:
def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11))
String buildSrcGradle = output["buildSrc/settings.gradle"]

expect:
!buildSrcGradle
}
}

0 comments on commit 7579cbb

Please sign in to comment.