Skip to content

Commit ab61e0c

Browse files
committed
chore: fix build warnings
1 parent 875f144 commit ab61e0c

File tree

7 files changed

+29
-33
lines changed

7 files changed

+29
-33
lines changed

build.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,10 @@ allprojects {
7676
}
7777
}
7878
tasks.withType<KotlinCompile> {
79-
sourceCompatibility = "unused"
80-
targetCompatibility = "unused"
8179
kotlinOptions {
8280
jvmTarget = "1.8"
8381
}
8482
}
85-
86-
plugins.withType<KotlinDslPlugin> {
87-
configure<KotlinDslPluginOptions> {
88-
experimentalWarning.set(false)
89-
}
90-
}
9183
}
9284

9385
val licenseHeader = file("gradle/license-header.txt").readText()

buildSrc/build.gradle.kts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ plugins {
2424
}
2525

2626
repositories {
27-
jcenter()
27+
mavenCentral()
2828
gradlePluginPortal()
2929
}
3030

3131
val licenseHeader = file("$rootDir/../gradle/license-header.txt").readText()
3232
allprojects {
3333
repositories {
34-
jcenter()
34+
mavenCentral()
3535
gradlePluginPortal()
3636
}
3737
applyKotlinProjectConventions()
@@ -56,15 +56,11 @@ allprojects {
5656
fun Project.applyKotlinProjectConventions() {
5757
apply(plugin = "org.gradle.kotlin.kotlin-dsl")
5858

59-
plugins.withType<KotlinDslPlugin> {
60-
configure<KotlinDslPluginOptions> {
61-
experimentalWarning.set(false)
62-
}
59+
java {
60+
sourceCompatibility = JavaVersion.VERSION_1_8
61+
targetCompatibility = JavaVersion.VERSION_1_8
6362
}
64-
6563
tasks.withType<KotlinCompile> {
66-
sourceCompatibility = "unused"
67-
targetCompatibility = "unused"
6864
kotlinOptions {
6965
jvmTarget = "1.8"
7066
}

buildSrc/subprojects/license-texts/license-texts.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ dependencies {
2323
implementation("com.squareup:kotlinpoet:1.3.0")
2424
}
2525

26+
java {
27+
sourceCompatibility = JavaVersion.VERSION_1_8
28+
targetCompatibility = JavaVersion.VERSION_1_8
29+
}
30+
2631
gradlePlugin {
2732
plugins {
2833
register("buildplugins.license-texts") {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ com.github.vlsi.checksum-dependency.version=1.86
2828

2929
# Plugins
3030
com.github.autostyle.version=3.2
31-
com.gradle.plugin-publish.version=1.1.0
31+
com.gradle.plugin-publish.version=1.2.0
3232
org.jetbrains.gradle.plugin.idea-ext.version=0.7
3333
com.github.ben-manes.versions.version=0.21.0
3434
org.jetbrains.dokka.version=1.4.32

plugins/license-gather-plugin/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ tasks {
6161
}
6262
}
6363

64+
processResources {
65+
dependsOn(copyLicenses)
66+
}
67+
6468
val allLicenseTextsDir = "$buildDir/license-texts"
6569
val copyTexts by registering(Sync::class) {
6670
into(allLicenseTextsDir)
@@ -87,7 +91,7 @@ tasks {
8791

8892
classpath(sourceSets.main.map { it.runtimeClasspath })
8993
classpath(allLicenseTextsDir)
90-
main = "com.github.vlsi.gradle.license.SpdxPredictorKt"
94+
mainClass.set("com.github.vlsi.gradle.license.SpdxPredictorKt")
9195
args("$output/com/github/vlsi/gradle/license/api/models/tfidf_licenses.bin")
9296
}
9397

plugins/license-gather-plugin/src/main/kotlin/com/github/vlsi/gradle/license/GatherLicenseTask.kt

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -320,20 +320,11 @@ open class GatherLicenseTask @Inject constructor(
320320
)
321321

322322
haveFilesToAnalyze = true
323-
if (GradleVersion.current() < GradleVersion.version("5.6")) {
324-
@Suppress("DEPRECATION")
325-
workerExecutor.submit(FindLicense::class) {
326-
displayName = "Extract licenses for ${compId.displayName}"
327-
isolationMode = IsolationMode.NONE
328-
params(compId.displayName, art.file, artLicenseTexts)
329-
}
330-
} else {
331-
@Suppress("UnstableApiUsage")
332-
workerExecutor.noIsolation().submit(FindLicenseWorkAction::class) {
333-
id.set(compId.displayName)
334-
file.set(art.file)
335-
outputDir.set(artLicenseTexts)
336-
}
323+
@Suppress("UnstableApiUsage")
324+
workerExecutor.noIsolation().submit(FindLicenseWorkAction::class) {
325+
id.set(compId.displayName)
326+
file.set(art.file)
327+
outputDir.set(artLicenseTexts)
337328
}
338329
}
339330
}

plugins/license-gather-plugin/src/main/kotlin/com/github/vlsi/gradle/license/MetadataStore.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,14 @@ object MetadataStore {
202202
is DisjunctionLicenseExpression -> "or" {
203203
licenses.forEach { it.exportLicense() }
204204
}
205+
LicenseExpression.NOASSERTION -> {
206+
"no-assertion"()
207+
}
208+
LicenseExpression.NONE -> {
209+
"none"()
210+
}
211+
is SimpleLicenseExpression -> TODO("SimpleLicenseExpression: $this")
212+
is LicenseExpressionSetExpression -> TODO("LicenseExpressionSetExpression: $this")
205213
}
206214
}
207215

0 commit comments

Comments
 (0)