Skip to content

Commit

Permalink
Allow overriding the dslKind when creating a project builder
Browse files Browse the repository at this point in the history
  • Loading branch information
staktrace authored and autonomousapps committed Dec 14, 2023
1 parent 22ae6fc commit 5db1c8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ abstract class AbstractProject extends AbstractGradleProject {
protected static final PRINT_ADVICE = "dependency.analysis.print.build.health=true"

@Override
protected GradleProject.Builder newGradleProjectBuilder() {
return super.newGradleProjectBuilder()
protected GradleProject.Builder newGradleProjectBuilder(GradleProject.DslKind dslKind = GradleProject.DslKind.GROOVY) {
return super.newGradleProjectBuilder(dslKind)
.withRootProject { r ->
r.gradleProperties += GradleProperties.enableConfigurationCache() + PRINT_ADVICE
r.withBuildScript { bs ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public abstract class AbstractGradleProject @JvmOverloads constructor(
System.getProperty("com.autonomousapps.plugin-under-test.repos-included", "").split(',')
}

protected open fun newGradleProjectBuilder(): GradleProject.Builder {
return GradleProject.Builder(rootDir.toFile(), GradleProject.DslKind.GROOVY)
protected open fun newGradleProjectBuilder(dslKind: GradleProject.DslKind = GradleProject.DslKind.GROOVY): GradleProject.Builder {
return GradleProject.Builder(rootDir.toFile(), dslKind)
}

/**
Expand Down

0 comments on commit 5db1c8f

Please sign in to comment.