Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GPL violation #1530

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions photon-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions photon-lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ext {
includePhotonTargeting = true
// Include the generated Version file
generatedHeaders = "src/generate/native/include"
licenseFile = file("LICENSE")
}

apply plugin: 'cpp'
Expand Down
4 changes: 4 additions & 0 deletions photon-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ application {
mainClass = 'org.photonvision.Main'
}

jar {
from file("$rootDir/LICENSE")
}

shadowJar {
archiveBaseName = "photonvision"
archiveVersion = project.version as String
Expand Down
1 change: 1 addition & 0 deletions photon-targeting/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 0 additions & 2 deletions shared/config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
Expand Down
10 changes: 10 additions & 0 deletions shared/javacommon.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -21,34 +22,43 @@ 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) {
archiveBaseName = javaBaseName
destinationDirectory = outputsFolder
archiveClassifier = 'sources'
from sourceSets.main.allSource
from licenseFile
}

task outputJavadocJar(type: Jar, dependsOn: javadoc) {
archiveBaseName = javaBaseName
destinationDirectory = outputsFolder
archiveClassifier = 'javadoc'
from javadoc.destinationDir
from licenseFile
}

artifacts {
Expand Down
3 changes: 1 addition & 2 deletions shared/javacpp/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading