Skip to content

Commit

Permalink
simplify publish model for photon-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Nov 19, 2023
1 parent 0364e14 commit f48e655
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions photon-lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,11 @@ cppHeadersZip {
}
}

model {
components {
all {
it.sources.each {
it.exportedHeaders {
srcDirs "src/main/native/include"
srcDirs "src/generate/native/include"
}
}
}
}
}

def photonlibFileInput = file("src/generate/photonlib.json.in")
ext.photonlibFileOutput = file("$buildDir/generated/vendordeps/photonlib.json")

def vendorJson = artifacts.add('archives', file("$photonlibFileOutput"))

task generateVendorJson() {
description = "Generates the vendor JSON file"
group = "PhotonVision"
Expand Down Expand Up @@ -121,9 +110,19 @@ task writeCurrentVersion {

build.mustRunAfter writeCurrentVersion

def vendorJson = artifacts.add('archives', file("$photonlibFileOutput"))

model {
components {
all {
it.sources.each {
it.exportedHeaders {
srcDirs "src/main/native/include"
srcDirs "src/generate/native/include"
}
}
}
}

// Publish the vendordep json
publishing {
publications {
vendorjson(MavenPublication) {
Expand Down

0 comments on commit f48e655

Please sign in to comment.