File tree Expand file tree Collapse file tree 7 files changed +29
-33
lines changed
subprojects/license-texts
plugins/license-gather-plugin
src/main/kotlin/com/github/vlsi/gradle/license Expand file tree Collapse file tree 7 files changed +29
-33
lines changed Original file line number Diff line number Diff line change @@ -76,18 +76,10 @@ allprojects {
76
76
}
77
77
}
78
78
tasks.withType<KotlinCompile > {
79
- sourceCompatibility = " unused"
80
- targetCompatibility = " unused"
81
79
kotlinOptions {
82
80
jvmTarget = " 1.8"
83
81
}
84
82
}
85
-
86
- plugins.withType<KotlinDslPlugin > {
87
- configure<KotlinDslPluginOptions > {
88
- experimentalWarning.set(false )
89
- }
90
- }
91
83
}
92
84
93
85
val licenseHeader = file(" gradle/license-header.txt" ).readText()
Original file line number Diff line number Diff line change @@ -24,14 +24,14 @@ plugins {
24
24
}
25
25
26
26
repositories {
27
- jcenter ()
27
+ mavenCentral ()
28
28
gradlePluginPortal()
29
29
}
30
30
31
31
val licenseHeader = file(" $rootDir /../gradle/license-header.txt" ).readText()
32
32
allprojects {
33
33
repositories {
34
- jcenter ()
34
+ mavenCentral ()
35
35
gradlePluginPortal()
36
36
}
37
37
applyKotlinProjectConventions()
@@ -56,15 +56,11 @@ allprojects {
56
56
fun Project.applyKotlinProjectConventions () {
57
57
apply (plugin = " org.gradle.kotlin.kotlin-dsl" )
58
58
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
63
62
}
64
-
65
63
tasks.withType<KotlinCompile > {
66
- sourceCompatibility = " unused"
67
- targetCompatibility = " unused"
68
64
kotlinOptions {
69
65
jvmTarget = " 1.8"
70
66
}
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ dependencies {
23
23
implementation(" com.squareup:kotlinpoet:1.3.0" )
24
24
}
25
25
26
+ java {
27
+ sourceCompatibility = JavaVersion .VERSION_1_8
28
+ targetCompatibility = JavaVersion .VERSION_1_8
29
+ }
30
+
26
31
gradlePlugin {
27
32
plugins {
28
33
register(" buildplugins.license-texts" ) {
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ com.github.vlsi.checksum-dependency.version=1.86
28
28
29
29
# Plugins
30
30
com.github.autostyle.version =3.2
31
- com.gradle.plugin-publish.version =1.1 .0
31
+ com.gradle.plugin-publish.version =1.2 .0
32
32
org.jetbrains.gradle.plugin.idea-ext.version =0.7
33
33
com.github.ben-manes.versions.version =0.21.0
34
34
org.jetbrains.dokka.version =1.4.32
Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ tasks {
61
61
}
62
62
}
63
63
64
+ processResources {
65
+ dependsOn(copyLicenses)
66
+ }
67
+
64
68
val allLicenseTextsDir = " $buildDir /license-texts"
65
69
val copyTexts by registering(Sync ::class ) {
66
70
into(allLicenseTextsDir)
@@ -87,7 +91,7 @@ tasks {
87
91
88
92
classpath(sourceSets.main.map { it.runtimeClasspath })
89
93
classpath(allLicenseTextsDir)
90
- main = " com.github.vlsi.gradle.license.SpdxPredictorKt"
94
+ mainClass.set( " com.github.vlsi.gradle.license.SpdxPredictorKt" )
91
95
args(" $output /com/github/vlsi/gradle/license/api/models/tfidf_licenses.bin" )
92
96
}
93
97
Original file line number Diff line number Diff line change @@ -320,20 +320,11 @@ open class GatherLicenseTask @Inject constructor(
320
320
)
321
321
322
322
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)
337
328
}
338
329
}
339
330
}
Original file line number Diff line number Diff line change @@ -202,6 +202,14 @@ object MetadataStore {
202
202
is DisjunctionLicenseExpression -> " or" {
203
203
licenses.forEach { it.exportLicense() }
204
204
}
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 " )
205
213
}
206
214
}
207
215
You can’t perform that action at this time.
0 commit comments