Skip to content

Commit

Permalink
Merge pull request #36194 from ia3andy/rename-tooling-codestarts-2
Browse files Browse the repository at this point in the history
Rename tooling codestarts
  • Loading branch information
gsmet authored Oct 25, 2023
2 parents e50692b + 7862303 commit 8d8610a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: gradle-wrapper
name: tooling-gradle-wrapper
type: tooling
output-strategy:
"gradlew": "executable"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: maven-wrapper
name: tooling-maven-wrapper
type: tooling
output-strategy:
"mvnw": "executable"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: dockerfiles
name: tooling-dockerfiles
type: tooling
language:
base:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name: github-action
name: tooling-github-action
type: tooling
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ public enum Language implements DataKey {
}

public enum Tooling implements DataKey {
GRADLE_WRAPPER,
MAVEN_WRAPPER,
DOCKERFILES
TOOLING_GRADLE_WRAPPER,
TOOLING_MAVEN_WRAPPER,
TOOLING_DOCKERFILES,
TOOLING_GITHUB_ACTION
}

public enum ExtensionCodestart implements DataKey {
Expand Down Expand Up @@ -244,17 +245,17 @@ private List<String> getToolingCodestarts(QuarkusCodestartProjectInput projectIn
switch (projectInput.getBuildTool()) {
case GRADLE:
case GRADLE_KOTLIN_DSL:
codestarts.add(QuarkusCodestartCatalog.Tooling.GRADLE_WRAPPER.key());
codestarts.add(Tooling.TOOLING_GRADLE_WRAPPER.key());
break;
case MAVEN:
codestarts.add(QuarkusCodestartCatalog.Tooling.MAVEN_WRAPPER.key());
codestarts.add(Tooling.TOOLING_MAVEN_WRAPPER.key());
break;
default:
throw new IllegalArgumentException("Unsupported build tool wrapper: " + projectInput.getBuildTool());
}
}
if (projectInput.getAppContent().contains(AppContent.DOCKERFILES)) {
codestarts.add(QuarkusCodestartCatalog.Tooling.DOCKERFILES.key());
codestarts.add(QuarkusCodestartCatalog.Tooling.TOOLING_DOCKERFILES.key());
}
return codestarts;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ void createProjectTestNoExample() throws IOException {
.isEqualTo("java");
assertThat(projectDefinition.getBaseCodestarts()).hasSize(4);
assertThat(projectDefinition.getExtraCodestarts()).extracting(Codestart::getName)
.containsExactlyInAnyOrder("dockerfiles",
"maven-wrapper");
.containsExactlyInAnyOrder("tooling-dockerfiles",
"tooling-maven-wrapper");
}

@Test
Expand Down Expand Up @@ -136,8 +136,8 @@ void prepareProjectTestResteasy() throws IOException {
.contains("config-properties");
assertThat(projectDefinition.getExtraCodestarts()).extracting(Codestart::getName)
.containsExactlyInAnyOrder(
"dockerfiles",
"maven-wrapper",
"tooling-dockerfiles",
"tooling-maven-wrapper",
"resteasy-codestart");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void generateGradleWrapperGithubAction(TestInfo testInfo) throws Throwabl
final QuarkusCodestartProjectInput input = QuarkusCodestartProjectInput.builder()
.buildTool(BuildTool.GRADLE)
.addData(getGenerationTestInputData())
.addCodestarts(Collections.singletonList("github-action"))
.addCodestarts(Collections.singletonList("tooling-github-action"))
.build();
Path projectDir = testDirPath.resolve("gradle-github");
getCatalog().createProject(input).generate(projectDir);
Expand All @@ -284,7 +284,7 @@ public void generateGradleNoWrapperGithubAction(TestInfo testInfo) throws Throwa
.buildTool(BuildTool.GRADLE)
.noBuildToolWrapper()
.addData(getGenerationTestInputData())
.addCodestarts(Collections.singletonList("github-action"))
.addCodestarts(Collections.singletonList("tooling-github-action"))
.build();
Path projectDir = testDirPath.resolve("gradle-nowrapper-github");
getCatalog().createProject(input).generate(projectDir);
Expand Down

0 comments on commit 8d8610a

Please sign in to comment.