Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency gradle to v8.10.1 #287

Merged
merged 4 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gradlePlugin {
}

val createClasspathManifest = tasks.register("createClasspathManifest") {
val outputDir = file("${buildDir}/${name}")
val outputDir = file(project.layout.buildDirectory.file(name))

inputs.files(sourceSets.main.get().runtimeClasspath)
outputs.dir(outputDir)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import gradle.kotlin.dsl.accessors._81cadab438125fe32232621fe97f8fea.testImplementation
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,19 @@ class PublishPlugin : Plugin<Project> {
// as well as https://github.com/gradle/gradle/issues/10900
isPreserveFileTimestamps = false
isReproducibleFileOrder = true

// TODO 6.0.0 switch to the following once we drop support for gradle 6, require 7.4 at least
@Suppress("DEPRECATION")
dirMode = "775".toInt(8)
@Suppress("DEPRECATION")
fileMode = "664".toInt(8)
// dirPermissions {
// unix("rwxrwxr-x")
// }
//
// filePermissions {
// unix("rw-rw-r--")
// }
}

project.tasks.withType<Jar>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class PublishPluginIntTest {
}
def result = builder
.withProjectDir(settingsSetup.tmp)
.withArguments("publishAllPublicationsToMavenRepository", "--stacktrace")
.withArguments("publishAllPublicationsToMavenRepository", "--stacktrace")
.build()

//assert
Expand Down Expand Up @@ -303,6 +303,7 @@ class PublishPluginIntTest {
//assert
def dependentReleasePath = getReleasePath(settingsSetup, dependentName, groupId, version, dependentName)
def (dependentPom, dependentPomName) = getPomInclFileNameAndAssertBasicPomProperties(dependentReleasePath, dependentName, groupId, version, githubUser, rootProjectName)

assertContainsRegex(dependentPom, "licenses", "<licenses>$NL_INDENT" +
"<license>$NL_INDENT" +
"<name>${StandardLicenses.EUPL_1_2.longName}</name>$NL_INDENT" +
Expand All @@ -319,6 +320,18 @@ class PublishPluginIntTest {
"<url>https://tutteli.ch</url>$NL_INDENT" +
"</developer>$NL_INDENT" +
"</developers>")

String runtimeDependency = ""
if (gradleVersion != null && (gradleVersion.startsWith("6") || gradleVersion.startsWith("7"))) {
runtimeDependency = "<dependency>$NL_INDENT" +
"<groupId>$groupId</groupId>$NL_INDENT" +
"<artifactId>$subprojectName</artifactId>$NL_INDENT" +
"<version>$version</version>$NL_INDENT" +
"<scope>runtime</scope>$NL_INDENT" +
"</dependency>$NL_INDENT" +
"</dependencies>"
}

assertContainsRegex(dependentPom, "dependencies", "<dependencies>$NL_INDENT" +
"<dependency>$NL_INDENT" +
"<groupId>$groupId</groupId>$NL_INDENT" +
Expand All @@ -331,14 +344,7 @@ class PublishPluginIntTest {
"<artifactId>kotlin-stdlib-jdk8</artifactId>$NL_INDENT" +
"<version>$KOTLIN_VERSION</version>$NL_INDENT" +
"<scope>compile</scope>$NL_INDENT" +
"</dependency>$NL_INDENT" +
"<dependency>$NL_INDENT" +
"<groupId>$groupId</groupId>$NL_INDENT" +
"<artifactId>$subprojectName</artifactId>$NL_INDENT" +
"<version>$version</version>$NL_INDENT" +
"<scope>runtime</scope>$NL_INDENT" +
"</dependency>$NL_INDENT" +
"</dependencies>"
"</dependency>$NL_INDENT" + runtimeDependency
)

def repoUrl = "https://github.com/$githubUser/$rootProjectName"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@ class PublishPluginSmokeTest {
assertExtensionAndTaskDefinedAfterEvaluate(project)
}

@Test
void kotlinOldPlatformJs_TasksAndExtensionPresent() {
//arrange & act
Project project = setUp { project ->
project.plugins.apply('kotlin-platform-js')
}
project.evaluate()
//assert
assertExtensionAndTaskDefinedAfterEvaluate(project)
}


@Test
void kotlinMultiplatform_TasksAndExtensionPresent() {
//arrange & act
Expand Down
2 changes: 1 addition & 1 deletion tutteli-gradle-spek/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ afterEvaluate {
sourceSets {
main {
groovy {
srcDirs("src/main/generated/")
srcDirs("src/main/generated/groovy")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ class SpekPluginIntTest {
}
def result = builder
.withProjectDir(settingsSetup.tmp)
.withArguments("clean", "build")
.withArguments("clean", "build", "--stacktrace")
.build()
assertTrue(result.output.contains("was here"), "println in output:\n" + result.output)
def failed = result.taskPaths(TaskOutcome.FAILED)
assertTrue(failed.empty, 'FAILED is empty but was not: ' + failed)
}

static List<Arguments> kotlinVersionAndGradle() {
return ['1.7.20', '1.8.10', '1.9.10'].collectMany { kotlinVersion ->
def gradleVersions = ['8.1.1', '8.3']
return ['1.8.10', '1.9.10', '2.0.20'].collectMany { kotlinVersion ->
def gradleVersions = ['8.3', '8.10']
gradleVersions.collect { gradleVersion ->
Arguments.of(kotlinVersion, gradleVersion)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ class SpekPluginSmokeTest {
smokeTest(KotlinPluginWrapper)
}

@Test
void smokeTest_KotlinPlatformJvmPlugin() {
smokeTest(KotlinPlatformJvmPlugin)
}
@Test
void smokeTest_KotlinMultiPlatformPlugin() {
smokeTest(KotlinMultiplatformPluginWrapper)
Expand Down
Loading