Skip to content

Commit

Permalink
fix various warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredsburrows committed Jul 30, 2024
1 parent b893011 commit d545c0f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
id 'org.jetbrains.kotlin.jvm' version '2.0.0' apply false
id 'org.jetbrains.dokka' version '1.8.10' apply false
id 'org.jlleitschuh.gradle.ktlint' version '12.1.1' apply false
id 'com.gradle.plugin-publish' version '0.21.0' apply false
id 'java-gradle-plugin'
id 'java-library'
id 'groovy'
Expand Down Expand Up @@ -39,9 +43,9 @@ subprojects {
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
tasks.withType(KotlinJvmCompile).configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}

Expand Down
10 changes: 6 additions & 4 deletions gradle-versions-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'org.jetbrains.kotlin.jvm'
id 'org.jetbrains.dokka'
id 'org.jlleitschuh.gradle.ktlint'
id 'com.gradle.plugin-publish' version '0.21.0'
id 'com.gradle.plugin-publish'
id 'maven-publish'
id 'java-gradle-plugin'
id 'java-library'
Expand All @@ -13,7 +13,7 @@ group = GROUP
version = VERSION_NAME

// Write the plugin's classpath to a file to share with the tests
task createClasspathManifest {
tasks.register('createClasspathManifest') {
def outputDir = file("$buildDir/$name")

inputs.files sourceSets.main.runtimeClasspath
Expand Down Expand Up @@ -41,14 +41,16 @@ dependencies {
testImplementation 'org.spockframework:spock-junit4:2.1-M2-groovy-3.0', { exclude module: 'groovy-all' } // Use localGroovy()
}

task docsJar(type: Jar, dependsOn: dokkaHtml) {
tasks.register('docsJar', Jar) {
dependsOn dokkaHtml
group = 'Publications'
description = 'Create jar of documentation.'
archiveClassifier = 'javadoc'
from dokkaJavadoc.outputDirectory
}

task sourcesJar(type: Jar, dependsOn: classes) {
tasks.register('sourcesJar', Jar) {
dependsOn classes
group = 'Publications'
description = 'Create jar of sources.'
archiveClassifier = 'sources'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ final class DependencyUpdatesSpec extends Specification {
def project = singleProject()
addRepositoryTo(project)
addDependenciesTo(project)
project.configurations.all {
project.configurations.configureEach {
resolutionStrategy {
failOnDynamicVersions()
}
Expand Down Expand Up @@ -189,6 +189,7 @@ final class DependencyUpdatesSpec extends Specification {
@Unroll
def 'Multi-project with dependencies on parent (#revision, #outputFormat)'() {
given:
//noinspection GroovyUnusedAssignment
def (rootProject, childProject) = multiProject()
addRepositoryTo(rootProject)
addDependenciesTo(rootProject)
Expand Down Expand Up @@ -620,7 +621,7 @@ final class DependencyUpdatesSpec extends Specification {

when:
def reporter = evaluate(project, 'milestone', null, 'build', null, null, false,
"", RELEASE_CANDIDATE.id, {config -> config.name.equals("upgradesFound")})
"", RELEASE_CANDIDATE.id, {config -> (config.name == "upgradesFound") })
reporter.write()

then:
Expand Down

0 comments on commit d545c0f

Please sign in to comment.