Update to new Native Utils (#1696)

Also update to azure 2019 windows image
This commit is contained in:
Thad House
2019-06-28 14:09:10 -07:00
committed by Peter Johnson
parent 30e936837c
commit 3dfb01d45b
36 changed files with 408 additions and 659 deletions

View File

@@ -40,6 +40,7 @@ import org.gradle.platform.base.ComponentType;
import org.gradle.platform.base.TypeBuilder;
import org.gradle.nativeplatform.tasks.ObjectFilesToBinary;
import groovy.transform.CompileStatic;
import edu.wpi.first.nativeutils.tasks.ExportsGenerationTask
@CompileStatic
class SingleNativeBuild implements Plugin<Project> {
@@ -94,8 +95,7 @@ class SingleNativeBuild implements Plugin<Project> {
return
}
def tmpBaseBin = (NativeBinarySpec) oTmpBaseBin
if (tmpBaseBin.targetPlatform.operatingSystem.name == binary.targetPlatform.operatingSystem.name &&
tmpBaseBin.targetPlatform.architecture.name == binary.targetPlatform.architecture.name &&
if (tmpBaseBin.targetPlatform.name == binary.targetPlatform.name &&
tmpBaseBin.buildType == binary.buildType) {
baseBin = tmpBaseBin
}
@@ -105,6 +105,10 @@ class SingleNativeBuild implements Plugin<Project> {
if (binary instanceof SharedLibraryBinarySpec) {
def sBinary = (SharedLibraryBinarySpec) binary
ObjectFilesToBinary link = (ObjectFilesToBinary) sBinary.tasks.link
ExportsGenerationTask exportsTask = binary.tasks.withType(ExportsGenerationTask)[0]
if (exportsTask != null) {
exportsTask.dependsOn compileTask
}
link.dependsOn compileTask
link.inputs.dir compileTask.objectFileDir
def tree = project.fileTree(compileTask.objectFileDir)