Skip to content

Commit

Permalink
Merge pull request #9907 from murdos/fix/gradle-gitignore-buildsrc
Browse files Browse the repository at this point in the history
fix: move gitignore configuration for buildSrc from spring-boot-local-profile module to gradle-java module
  • Loading branch information
pascalgrimaud authored May 25, 2024
2 parents 6cadd5d + 79059a4 commit 21f9e34
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public JHipsterModule buildGradleModule(JHipsterModuleProperties properties) {
.comment("Gradle")
.pattern("/.gradle/")
.pattern("/build/")
.pattern("./buildSrc/.gradle/")
.pattern("./buildSrc/build/")
.and()
.files()
.batch(SOURCE, to("."))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.jhipster.lite.generator.server.springboot.localeprofile.domain;

import static tech.jhipster.lite.module.domain.JHipsterModule.*;
import static tech.jhipster.lite.module.domain.replacement.ReplacementCondition.*;
import static tech.jhipster.lite.module.domain.replacement.ReplacementCondition.notContainingReplacement;

import tech.jhipster.lite.module.domain.JHipsterModule;
import tech.jhipster.lite.module.domain.buildproperties.PropertyKey;
Expand All @@ -21,11 +21,6 @@ public JHipsterModule buildModule(JHipsterModuleProperties properties) {

//@formatter:off
return moduleBuilder(properties)
.gitIgnore()
.comment("Gradle")
.pattern("./buildSrc/.gradle/")
.pattern("./buildSrc/build/")
.and()
.javaBuildProperties()
.set(new PropertyKey(SPRING_PROFILES_ACTIVE), new PropertyValue(""))
.and()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package tech.jhipster.lite.generator.buildtool.gradle.domain;

import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.*;
import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.assertThatModule;
import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.assertThatModuleWithFiles;

import org.junit.jupiter.api.Test;
import tech.jhipster.lite.TestFileUtils;
Expand Down Expand Up @@ -29,7 +30,9 @@ void shouldBuildModule() {
"""
# Gradle
/.gradle/
/build/\
/build/
./buildSrc/.gradle/
./buildSrc/build/\
"""
)
.and()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,6 @@ void shouldBuildModule() {
JHipsterModule module = factory.buildModule(properties);

assertThatModuleWithFiles(module, gradleBuildFile(), gradleLibsVersionFile())
.hasFile(".gitignore")
.containing(
"""
# Gradle
./buildSrc/.gradle/
./buildSrc/build/\
"""
)
.and()
.hasFile("build.gradle.kts")
.containing(
"""
Expand Down

0 comments on commit 21f9e34

Please sign in to comment.