Skip to content

Commit

Permalink
clean up build
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredsburrows committed Aug 15, 2024
1 parent 51ac7f0 commit 7a4ffc6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
22 changes: 11 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
Expand Down Expand Up @@ -48,7 +50,7 @@ allprojects {

subprojects {
tasks.withType(Jar).configureEach {
def dateFile = new File(buildDir, 'jar-manifest-date.txt')
def dateFile = layout.buildDirectory.file('jar-manifest-date.txt').get().asFile
if (!dateFile.exists()) {
def date = DateTimeFormatter.ofPattern('EEE MMM dd HH:mm:ss zzz yyyy').
format(ZonedDateTime.now())
Expand All @@ -72,8 +74,8 @@ subprojects {
tasks.withType(KotlinJvmCompile).configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
languageVersion.set(KotlinVersion.KOTLIN_1_9)
apiVersion.set(KotlinVersion.KOTLIN_1_9)
languageVersion.set(KotlinVersion.KOTLIN_2_0)
apiVersion.set(KotlinVersion.KOTLIN_2_0)
freeCompilerArgs.add("-progressive")
freeCompilerArgs.add("-Xjsr305=strict")
freeCompilerArgs.add("-Xemit-jvm-type-annotations")
Expand Down Expand Up @@ -108,14 +110,12 @@ subprojects {
}

tasks.withType(Test).configureEach {
useJUnitPlatform()

testLogging {
exceptionFormat 'full'
showCauses true
showExceptions true
showStackTraces true
events 'failed', 'skipped'
exceptionFormat = TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true
events = [TestLogEvent.FAILED, TestLogEvent.SKIPPED]
}

def maxWorkerCount = gradle.startParameter.maxWorkerCount
Expand Down
2 changes: 1 addition & 1 deletion gradle-license-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
}

tasks.register('createClasspathManifest') {
def outputDir = new File(buildDir, name)
def outputDir = layout.buildDirectory.file(name).get().asFile

inputs.files sourceSets.main.runtimeClasspath
outputs.dir outputDir
Expand Down
18 changes: 9 additions & 9 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ plugins {
id 'com.gradle.develocity' version '3.17.6'
}

develocity {
buildScan {
termsOfUseUrl = 'https://gradle.com/terms-of-service'
termsOfUseAgree = 'yes'
def isCI = System.getenv('CI') != null
publishing.onlyIf { isCI }
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)

Expand All @@ -29,6 +20,15 @@ dependencyResolutionManagement {
}
}

develocity {
buildScan {
termsOfUseUrl = 'https://gradle.com/terms-of-service'
termsOfUseAgree = 'yes'
def isCI = System.getenv('CI') != null
publishing.onlyIf { isCI }
}
}

rootProject.name = 'gradle-license-plugin'

include ':gradle-license-plugin'

0 comments on commit 7a4ffc6

Please sign in to comment.