Skip to content

Commit

Permalink
Update dependency name.remal.gradle-plugins.toolkit:build-logic to v0…
Browse files Browse the repository at this point in the history
….72.1 (#105)

* Update dependency name.remal.gradle-plugins.toolkit:build-logic to v0.72.1

* fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Semyon Levin <[email protected]>
  • Loading branch information
renovate[bot] and remal authored Jan 24, 2025
1 parent ab6650d commit 76cb285
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
String rootSnapshotVersion = project.ext.rootSnapshotVersion = '2-SNAPSHOT'
dependencies {
//classpath("$rootGroupId:$rootArtifactId:$rootSnapshotVersion") { version { strictly(rootSnapshotVersion) } }
classpath 'name.remal.gradle-plugins.toolkit:build-logic:0.71.1'
classpath 'name.remal.gradle-plugins.toolkit:build-logic:0.72.1'
}
repositories {
mavenCentral()
Expand All @@ -28,7 +28,7 @@ apply plugin: 'name.remal.toolkit.build-logic'
apply plugin: 'java-gradle-plugin'

dependencies {
externalPluginsToTest 'name.remal.test-source-sets:name.remal.test-source-sets.gradle.plugin:5.0.0'
functionalTestAdditionalClasspath 'name.remal.test-source-sets:name.remal.test-source-sets.gradle.plugin:5.0.0'
}

gradlePlugin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package name.remal.gradle_plugins.finalize_by_jacoco;

import static java.lang.String.join;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
import static name.remal.gradle_plugins.toolkit.testkit.GradleDependencyVersions.getExternalPluginToTestVersion;
import static name.remal.gradle_plugins.toolkit.testkit.GradleDependencyVersions.getJUnitVersion;
import static name.remal.gradle_plugins.toolkit.testkit.TestClasspath.getTestClasspathLibraryFilePaths;
import static name.remal.gradle_plugins.toolkit.testkit.TestClasspath.getTestClasspathLibraryVersion;
import static org.assertj.core.api.Assertions.assertThat;

import java.nio.file.Path;
import lombok.RequiredArgsConstructor;
import name.remal.gradle_plugins.toolkit.testkit.functional.GradleProject;
import org.gradle.testkit.runner.BuildTask;
Expand All @@ -28,12 +30,31 @@ void beforeEach() {
test.line("useJUnitPlatform()");
});

build.addMavenCentralRepository();
build.line("repositories { mavenCentral() }");

build.block("dependencies", deps -> {
deps.line("testImplementation platform('org.junit:junit-bom:" + getJUnitVersion() + "')");
deps.line("testImplementation 'org.junit.jupiter:junit-jupiter-api'");
deps.line("testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'");
deps.line("testRuntimeOnly 'org.junit.platform:junit-platform-launcher'");
deps.line(
"testImplementation files(%s)",
getTestClasspathLibraryFilePaths("org.junit.jupiter:junit-jupiter-api").stream()
.map(Path::toString)
.map(path -> "'" + deps.escapeString(path) + "'")
.collect(joining(", "))
);

deps.line(
"testRuntimeOnly files(%s)",
getTestClasspathLibraryFilePaths("org.junit.jupiter:junit-jupiter-engine").stream()
.map(Path::toString)
.map(path -> "'" + deps.escapeString(path) + "'")
.collect(joining(", "))
);
deps.line(
"testRuntimeOnly files(%s)",
getTestClasspathLibraryFilePaths("org.junit.platform:junit-platform-launcher").stream()
.map(Path::toString)
.map(path -> "'" + deps.escapeString(path) + "'")
.collect(joining(", "))
);
});
});

Expand Down Expand Up @@ -97,7 +118,7 @@ class TestSourceSets {
void beforeEach() {
project.getBuildFile().applyPlugin(
"name.remal.test-source-sets",
getExternalPluginToTestVersion("name.remal.test-source-sets")
getTestClasspathLibraryVersion("name.remal.test-source-sets:name.remal.test-source-sets.gradle.plugin")
);
project.getBuildFile().line("testSourceSets.create('integrationTest')");

Expand Down

0 comments on commit 76cb285

Please sign in to comment.