mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-30 02:31:40 +00:00
Build photonlib json first (#952)
This commit is contained in:
@@ -120,23 +120,22 @@ task generateVendorJson() {
|
||||
outputs.file photonlibFileOutput
|
||||
inputs.file photonlibFileInput
|
||||
|
||||
doLast {
|
||||
println "Writing version ${pubVersion} to $photonlibFileOutput"
|
||||
println "Writing vendor JSON ${pubVersion} to $photonlibFileOutput"
|
||||
|
||||
if (photonlibFileOutput.exists()) {
|
||||
photonlibFileOutput.delete()
|
||||
}
|
||||
photonlibFileOutput.parentFile.mkdirs()
|
||||
|
||||
def read = photonlibFileInput.text
|
||||
.replace('${photon_version}', pubVersion)
|
||||
.replace('${frc_year}', frcYear)
|
||||
photonlibFileOutput.write(read)
|
||||
}
|
||||
photonlibFileOutput.text = read
|
||||
|
||||
outputs.upToDateWhen { false }
|
||||
}
|
||||
|
||||
build.dependsOn generateVendorJson
|
||||
|
||||
build.mustRunAfter generateVendorJson
|
||||
|
||||
task writeCurrentVersion {
|
||||
def versionFileIn = file("${rootDir}/shared/PhotonVersion.java.in")
|
||||
@@ -147,7 +146,7 @@ task writeCurrentVersion {
|
||||
versionString)
|
||||
}
|
||||
|
||||
build.dependsOn writeCurrentVersion
|
||||
build.mustRunAfter writeCurrentVersion
|
||||
|
||||
tasks.withType(Javadoc) {
|
||||
options.encoding = 'UTF-8'
|
||||
|
||||
@@ -198,8 +198,7 @@ model {
|
||||
}
|
||||
}
|
||||
|
||||
// So I don't actually know the _right_ way to tell gradle that the vendordep json publish requires generation first, so we're doing this
|
||||
getTasksByName("publishVendorjsonPublicationToMavenLocal", false).each {
|
||||
tasks.withType(PublishToMavenRepository) {
|
||||
it.mustRunAfter generateVendorJson
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user