Skip to content

Commit

Permalink
Include legal files (#382)
Browse files Browse the repository at this point in the history
- Adds manually generated DEPENDENCIES file
- Includes LICENSE in META-INF
- Includes DEPENDENCIES in META-INF

{patch}

Signed-off-by: Esta Nagy <nagyesta@gmail.com>
  • Loading branch information
nagyesta authored Apr 13, 2024
1 parent 0260706 commit 0c8f3af
Showing 2 changed files with 36 additions and 6 deletions.
11 changes: 11 additions & 0 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
maven/mavencentral/io.micrometer/micrometer-commons/1.12.5, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #11679
maven/mavencentral/io.micrometer/micrometer-observation/1.12.5, Apache-2.0, approved, #11680
maven/mavencentral/org.apache.commons/commons-collections4/4.4, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.slf4j/slf4j-api/2.0.13, MIT, approved, #5915
maven/mavencentral/org.springframework/spring-aop/6.1.6, Apache-2.0, approved, #11755
maven/mavencentral/org.springframework/spring-beans/6.1.6, Apache-2.0, approved, #11754
maven/mavencentral/org.springframework/spring-context-support/6.1.6, Apache-2.0, approved, #13496
maven/mavencentral/org.springframework/spring-context/6.1.6, Apache-2.0, approved, #11753
maven/mavencentral/org.springframework/spring-core/6.1.6, Apache-2.0 AND BSD-3-Clause, approved, #11750
maven/mavencentral/org.springframework/spring-expression/6.1.6, Apache-2.0, approved, #11747
maven/mavencentral/org.springframework/spring-jcl/6.1.6, Apache-2.0, approved, #11749
31 changes: 25 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -90,13 +90,30 @@ dependencies {
testImplementation libs.logback.classic
}

tasks.register('copyLicense', Copy.class) {
from file("${projectDir}/LICENSE")
into layout.buildDirectory.dir("resources/main/META-INF").get().asFile
}
tasks.register('copyDependencies', Copy.class) {
from file("${projectDir}/DEPENDENCIES")
into layout.buildDirectory.dir("resources/main/META-INF").get().asFile
}
tasks.javadoc.dependsOn(tasks.copyLicense)
tasks.javadoc.dependsOn(tasks.copyDependencies)
tasks.compileTestJava.dependsOn(tasks.copyLicense)
tasks.compileTestJava.dependsOn(tasks.copyDependencies)
tasks.checkstyleMain.dependsOn(tasks.copyLicense)
tasks.checkstyleMain.dependsOn(tasks.copyDependencies)
tasks.processResources.finalizedBy(tasks.copyLicense)
tasks.processResources.finalizedBy(tasks.copyDependencies)

jacocoTestReport {
reports {
xml.required.set(true)
xml.outputLocation.set(file("$buildDir/reports/jacoco/report.xml"))
xml.outputLocation.set(layout.buildDirectory.file("reports/jacoco/report.xml").get().asFile)
csv.required.set(false)
html.required.set(true)
html.outputLocation.set(file("$buildDir/reports/jacoco/html"))
html.outputLocation.set(layout.buildDirectory.dir("reports/jacoco/html").get().asFile)
}
}

@@ -112,8 +129,8 @@ jacoco {
}

jacocoTestCoverageVerification {
inputs.file(file("${buildDir}/reports/jacoco/report.xml") as String)
outputs.file(file("${buildDir}/reports/jacoco/jacocoTestCoverageVerification") as String)
inputs.file(layout.buildDirectory.file("reports/jacoco/report.xml").get().asFile)
outputs.file(layout.buildDirectory.file("reports/jacoco/jacocoTestCoverageVerification").get().asFile)

violationRules {
rule {
@@ -149,13 +166,13 @@ jacocoTestCoverageVerification {
}
}
doLast {
file("${buildDir}/reports/jacoco/jacocoTestCoverageVerification").write("Passed")
layout.buildDirectory.file("reports/jacoco/jacocoTestCoverageVerification").get().asFile.write("Passed")
}
}
jar.dependsOn check

tasks.withType(Checkstyle).configureEach {
configProperties = [base_dir: rootDir.toString(), cache_file: file("${buildDir}/checkstyle/cacheFile")]
configProperties = [base_dir: rootDir.toString(), cache_file: layout.buildDirectory.file("checkstyle/cacheFile").get().asFile]
reports {
xml.required.set(false)
html.required.set(true)
@@ -222,6 +239,8 @@ publishing {
}
}



//Disable metadata publishing and rely on Maven only
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false

0 comments on commit 0c8f3af

Please sign in to comment.