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

Add ntcoreffi headers zip #7229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
41 changes: 41 additions & 0 deletions ntcoreffi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,46 @@ def nativeName = 'ntcoreffi'
def baseArtifactId = nativeName
def artifactGroupId = "edu.wpi.first.${nativeName}"
def zipBaseName = "_GROUP_edu_wpi_first_${nativeName}_ID_${nativeName}-cpp_CLS"
def outputsFolder = file("$project.buildDir/outputs")

evaluationDependsOn(':ntcore')
evaluationDependsOn(':wpiutil')

def cppProjectZips = []
cppProjectZips.add(project(':ntcore').cppHeadersZip)
cppProjectZips.add(project(':wpiutil').cppHeadersZip)

task cppHeadersZip(type: Zip) {
destinationDirectory = outputsFolder
archiveBaseName = zipBaseName
archiveClassifier = "headers"
duplicatesStrategy = 'exclude'

from(licenseFile) {
into '/'
}

ext.includeDirs = [
project.file('src/main/native/include'),
]

ext.includeDirs.each {
from(it) {
into '/'
}
}

cppProjectZips.each {
dependsOn it
from zipTree(it.archiveFile)
}
}

artifacts {
archives cppHeadersZip
}

addTaskToCopyAllOutputs(cppHeadersZip)

model {
publishing {
Expand All @@ -94,6 +134,7 @@ model {
taskList.each {
artifact it
}
artifact cppHeadersZip

artifactId = "${baseArtifactId}-cpp"
groupId artifactGroupId
Expand Down
Loading