mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-25 01:41:40 +00:00
Add license to jars (#1530)
Fixes GPL violation, the license has been missing since 2024. This also puts licenses in as many JARs and native library archives as possible (for good measure.)
This commit is contained in:
@@ -4,6 +4,7 @@ plugins {
|
||||
|
||||
import java.nio.file.Path
|
||||
|
||||
ext.licenseFile = file("$rootDir/LICENSE")
|
||||
apply from: "${rootDir}/shared/common.gradle"
|
||||
|
||||
wpilibTools.deps.wpilibVersion = wpi.versions.wpilibVersion.get()
|
||||
|
||||
@@ -9,6 +9,7 @@ ext {
|
||||
includePhotonTargeting = true
|
||||
// Include the generated Version file
|
||||
generatedHeaders = "src/generate/native/include"
|
||||
licenseFile = file("LICENSE")
|
||||
}
|
||||
|
||||
apply plugin: 'cpp'
|
||||
|
||||
@@ -25,6 +25,10 @@ application {
|
||||
mainClass = 'org.photonvision.Main'
|
||||
}
|
||||
|
||||
jar {
|
||||
from file("$rootDir/LICENSE")
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveBaseName = "photonvision"
|
||||
archiveVersion = project.version as String
|
||||
|
||||
@@ -8,6 +8,7 @@ apply plugin: 'edu.wpi.first.NativeUtils'
|
||||
apply plugin: 'edu.wpi.first.WpilibTools'
|
||||
apply plugin: 'edu.wpi.first.GradleJni'
|
||||
|
||||
ext.licenseFile = file("$rootDir/LICENSE")
|
||||
apply from: "${rootDir}/shared/config.gradle"
|
||||
apply from: "${rootDir}/shared/javacommon.gradle"
|
||||
|
||||
|
||||
@@ -85,8 +85,6 @@ ext.appendDebugPathToBinaries = { binaries ->
|
||||
}
|
||||
}
|
||||
|
||||
def licenseFile = file("$rootDir/LICENCE")
|
||||
|
||||
// Create ZIP tasks for each component.
|
||||
ext.createComponentZipTasks = { components, names, base, type, project, func ->
|
||||
def stringNames = names.collect { it.toString() }
|
||||
|
||||
@@ -13,6 +13,7 @@ def artifactGroupId = 'org.photonvision'
|
||||
def javaBaseName = "_GROUP_org_photonvision_${baseArtifactId}_ID_${baseArtifactId}-java_CLS"
|
||||
|
||||
def outputsFolder = file("$buildDir/outputs")
|
||||
def licenseFile = ext.licenseFile
|
||||
|
||||
javadoc {
|
||||
options {
|
||||
@@ -21,20 +22,27 @@ javadoc {
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
from licenseFile
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
archiveClassifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
from licenseFile
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
archiveClassifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
from licenseFile
|
||||
}
|
||||
|
||||
task outputJar(type: Jar, dependsOn: classes) {
|
||||
archiveBaseName = javaBaseName
|
||||
destinationDirectory = outputsFolder
|
||||
from sourceSets.main.output
|
||||
from licenseFile
|
||||
}
|
||||
|
||||
task outputSourcesJar(type: Jar, dependsOn: classes) {
|
||||
@@ -42,6 +50,7 @@ task outputSourcesJar(type: Jar, dependsOn: classes) {
|
||||
destinationDirectory = outputsFolder
|
||||
archiveClassifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
from licenseFile
|
||||
}
|
||||
|
||||
task outputJavadocJar(type: Jar, dependsOn: javadoc) {
|
||||
@@ -49,6 +58,7 @@ task outputJavadocJar(type: Jar, dependsOn: javadoc) {
|
||||
destinationDirectory = outputsFolder
|
||||
archiveClassifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
from licenseFile
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
||||
@@ -10,8 +10,7 @@ def zipBaseName = "_GROUP_org_photonvision_${baseArtifactId}_ID_${baseArtifactId
|
||||
def jniBaseName = "_GROUP_edu_wpi_first_${nativeName}_ID_${nativeName}-jni_CLS"
|
||||
def jniCvStaticBaseName = "_GROUP_edu_wpi_first_${nativeName}_ID_${nativeName}-jnicvstatic_CLS"
|
||||
|
||||
def licenseFile = file("$rootDir/LICENCE")
|
||||
|
||||
def licenseFile = ext.licenseFile
|
||||
// Quick hack to make this name visible to photon-lib for combined
|
||||
ext.zipBaseName = zipBaseName
|
||||
ext.artifactGroupId = artifactGroupId
|
||||
|
||||
Reference in New Issue
Block a user