From d4b48216e846b68376ee8ed94222abc54fafa2d8 Mon Sep 17 00:00:00 2001 From: Thad House Date: Sun, 6 Nov 2016 17:42:34 -0800 Subject: [PATCH] Renames uberzip to athena-uberzip, and doesn't include static library in it --- cscore.gradle | 37 ++++++++++++++++--------------------- publish.gradle | 12 +++++++----- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/cscore.gradle b/cscore.gradle index 7148ce3f68..72f74f74f7 100644 --- a/cscore.gradle +++ b/cscore.gradle @@ -175,45 +175,40 @@ def cscoreZipTask = { project -> } } -def cscoreUberZipTask = { project -> - if (project.isArm) { - project.ext.cscoreUberZip = project.tasks.create("armCscoreUberZip", Zip) { - description = 'Create platform-specific zip of cscore libraries including opencv' +def cscoreAthenaUberZipTask = { pjt -> + if (pjt.isArm && !project.hasProperty('compilerPrefix')) { + pjt.ext.cscoreAthenaUberZip = pjt.tasks.create("athenaCscoreUberZip", Zip) { + description = 'Create athena zip of cscore libraries including opencv' group = 'WPILib' - destinationDir = project.buildDir + destinationDir = pjt.buildDir baseName = 'cscore' - classifier= "uber${project.buildPlatform}" + classifier = 'athena-uberzip' duplicatesStrategy = 'exclude' from(file('include')) { into 'include' } - if (!project.hasProperty('skipJava')) { - project.jniHeadersCscore.outputs.each { + if (!pjt.hasProperty('skipJava')) { + pjt.jniHeadersCscore.outputs.each { from(it) { into 'include' } } } - from(file("${project.openCvInclude}")) { + from(file("${pjt.openCvInclude}")) { exclude 'META-INF' into 'include' } - project.model { - def openCvPlatform = project.getOpenCvPlatformPackage(targetPlatform) - from(file("${project.openCv}/${openCvPlatform}")) { + pjt.model { + def openCvPlatform = pjt.getOpenCvPlatformPackage(targetPlatform) + from(file("${pjt.openCv}/${openCvPlatform}")) { exclude 'META-INF' into 'lib' } binaries { - withType(StaticLibraryBinarySpec) { binary -> - from(binary.staticLibraryFile) { - into 'lib' - } - } withType(SharedLibraryBinarySpec) { binary -> from(binary.sharedLibraryFile) { into 'lib' @@ -226,12 +221,12 @@ def cscoreUberZipTask = { project -> } } - project.build.dependsOn project.cscoreUberZip + pjt.build.dependsOn pjt.cscoreAthenaUberZip - project.tasks.whenTaskAdded { task -> + pjt.tasks.whenTaskAdded { task -> def name = task.name.toLowerCase() if (name.contains("cscoresharedlibrary") || name.contains("cscorestaticlibrary") || name.contains("cscoretest")) { - project.cscoreUberZip.dependsOn task + pjt.cscoreAthenaUberZip.dependsOn task } } } @@ -251,7 +246,7 @@ if (buildArm) { cscoreZipTask(project) useWpiUtil(project) useOpenCv(project) - cscoreUberZipTask(project) + cscoreAthenaUberZipTask(project) } } diff --git a/publish.gradle b/publish.gradle index 7900ead19c..28e06642bc 100644 --- a/publish.gradle +++ b/publish.gradle @@ -53,12 +53,12 @@ publishing { // If the library is not embedded include it in the repo if (!project.hasProperty('compilerPrefix')) { artifact camArm.cscoreZip + artifact camArm.athenaCscoreUberZip { + classifier = 'athena-uberzip' + } } artifact camArm.cscoreJavaSource artifact camArm.cscoreJavadoc - artifact camArm.armCscoreUberZip { - classifier = 'uberzip' - } } if (!OperatingSystem.current().isWindows()) { if (project.hasProperty('makeDesktop')) { @@ -80,9 +80,11 @@ publishing { artifact cscoreSourceZip if (project.buildArm) { artifact project(':arm').cscoreZip - artifact project(':arm').armCscoreUberZip { - classifier = 'uberzip' + if (!project.hasProperty('compilerPrefix')) { + artifact project(':arm').athenaCscoreUberZip { + classifier = 'athena-uberzip' } + } } if (!OperatingSystem.current().isWindows()) { if (project.hasProperty('makeDesktop')) {