mirror of
https://gitee.com/dcren/initializr.git
synced 2025-05-11 16:18:06 +08:00
Merge pull request #853 from jnizet
* pr/853: Polish "Avoid applying Kotlin JPA plugin" Avoid applying Kotlin JPA plugin
This commit is contained in:
commit
c13285f633
@ -45,7 +45,6 @@ public class KotlinJpaGradleBuildCustomizer implements BuildCustomizer<GradleBui
|
||||
if (this.buildMetadataResolver.hasFacet(build, "jpa")) {
|
||||
build.addPlugin("org.jetbrains.kotlin.plugin.jpa",
|
||||
this.settings.getVersion());
|
||||
build.applyPlugin("kotlin-jpa");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ class KotlinJpaGradleBuildCustomizerTests {
|
||||
Dependency dependency = Dependency.withId("foo");
|
||||
dependency.setFacets(Collections.singletonList("jpa"));
|
||||
GradleBuild build = getCustomizedBuild(dependency);
|
||||
assertThat(build.getAppliedPlugins()).contains("kotlin-jpa");
|
||||
assertThat(build.getAppliedPlugins()).isEmpty();
|
||||
assertThat(build.getPlugins()).hasSize(1);
|
||||
assertThat(build.getPlugins().get(0).getId())
|
||||
.isEqualTo("org.jetbrains.kotlin.plugin.jpa");
|
||||
@ -50,8 +50,8 @@ class KotlinJpaGradleBuildCustomizerTests {
|
||||
void customizeWhenJpaFacetAbsentShouldNotAddKotlinJpaPlugin() {
|
||||
Dependency dependency = Dependency.withId("foo");
|
||||
GradleBuild build = getCustomizedBuild(dependency);
|
||||
assertThat(build.getAppliedPlugins()).hasSize(0);
|
||||
assertThat(build.getPlugins()).hasSize(0);
|
||||
assertThat(build.getAppliedPlugins()).isEmpty();
|
||||
assertThat(build.getPlugins()).isEmpty();
|
||||
}
|
||||
|
||||
private GradleBuild getCustomizedBuild(Dependency dependency) {
|
||||
|
Loading…
Reference in New Issue
Block a user