[thredds] 21/26: Debhelper 10
Alastair McKinstry
mckinstry at moszumanska.debian.org
Mon Oct 23 10:24:25 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch ichec/master
in repository thredds.
commit 76d0a7f4f60f8dba732eda060d02f4ba1a22b51f
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Tue Aug 29 13:31:47 2017 +0100
Debhelper 10
---
debian/control | 34 ++++++---
debian/patches/fix-deps.patch | 173 ++++++++++++++++++++++++++++++++++++++++++
debian/rules | 4 +
3 files changed, 202 insertions(+), 9 deletions(-)
diff --git a/debian/control b/debian/control
index 79ff412..3bd4dd8 100644
--- a/debian/control
+++ b/debian/control
@@ -3,16 +3,32 @@ Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Alastair <mckinstry at debian.org>
-Build-Depends: debhelper (>= 9), cdbs, default-jdk, gradle-debian-helper,
+Build-Depends: debhelper (>= 10),
+ cdbs,
+ default-jdk,
+ gradle-debian-helper
Build-Depends-Indep: libmaven-shade-plugin-java,
- libmaven-war-plugin-java, libcommons-cli-java,
- libhttpclient-java, libhttpcore-java, libhttpmime-java,
- liblog4j2-java, libspring-web-servlet-java, libguava-java, libprotobuf-java,
- libjoda-time-java, libjcip-annotations-java, libjdom2-java, libjsoup-java,
- libspring-context-java, libspring-core-java, libspring-web-java,
- libquartz-java, libjbzip2-java, libspock-java,
- libxmlunit-java,
- libjtidy-java
+ libmaven-war-plugin-java,
+ libcommons-cli-java,
+ libhttpclient-java,
+ libhttpcore-java,
+ libhttpmime-java,
+ liblog4j2-java,
+ libspring-web-servlet-java,
+ libguava-java,
+ libprotobuf-java,
+ libjoda-time-java,
+ libjcip-annotations-java,
+ libjdom2-java,
+ libjsoup-java,
+ libspring-context-java,
+ libspring-core-java,
+ libspring-web-java,
+ libquartz-java,
+ libjbzip2-java,
+ libspock-java,
+ libxmlunit-java,
+ libjtidy-java
Standards-Version: 4.1.0
Vcs-Git: git://anonscm.debian.org/debian-science/packages/thredds.git
Vcs-Browser: https://anonscm.debian.org/debian-science/packages/thredds.git
diff --git a/debian/patches/fix-deps.patch b/debian/patches/fix-deps.patch
index bf34e9a..40ad965 100644
--- a/debian/patches/fix-deps.patch
+++ b/debian/patches/fix-deps.patch
@@ -2,6 +2,21 @@ Index: thredds-4.6.10/gradle/dependencies.gradle
===================================================================
--- thredds-4.6.10.orig/gradle/dependencies.gradle
+++ thredds-4.6.10/gradle/dependencies.gradle
+@@ -34,11 +34,11 @@ ext {
+
+ ////////////////////////////////////////// Plugins //////////////////////////////////////////
+
+-libraries["gretty"] = "com.cwardgar.gretty-fork:gretty:1.0.3"
++// libraries["gretty"] = "com.cwardgar.gretty-fork:gretty:1.0.3"
+
+-libraries["shadow"] = "com.github.jengelman.gradle.plugins:shadow:1.2.3"
++// libraries["shadow"] = "com.github.jengelman.gradle.plugins:shadow:1.2.3"
+
+-libraries["coveralls-gradle-plugin"] = "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1"
++// libraries["coveralls-gradle-plugin"] = "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1"
+
+ libraries["gradle-extra-configurations-plugin"] = "com.netflix.nebula:gradle-extra-configurations-plugin:2.2.1"
+
@@ -114,18 +114,18 @@ libraries["com.eclipsesource.restfuse"]
libraries["httpunit"] = "httpunit:httpunit:1.7"
@@ -70,6 +85,21 @@ Index: thredds-4.6.10/build.gradle
===================================================================
--- thredds-4.6.10.orig/build.gradle
+++ thredds-4.6.10/build.gradle
+@@ -58,10 +58,10 @@ buildscript {
+ }
+ }
+ dependencies {
+- classpath libraries["gretty"]
+- classpath libraries["shadow"]
+- classpath libraries["coveralls-gradle-plugin"]
+- classpath libraries["gradle-extra-configurations-plugin"]
++ // classpath libraries["gretty"]
++ // classpath libraries["shadow"]
++ // classpath libraries["coveralls-gradle-plugin"]
++ classpath libraries["gradle-extra-configurations-plugin"]
+
+ classpath libraries["guava"] // For various utility methods used in the build scripts.
+ }
@@ -69,11 +69,11 @@ buildscript {
apply from: "$rootDir/gradle/dependencies.gradle"
@@ -152,3 +182,146 @@ Index: thredds-4.6.10/netcdf4/build.gradle
+ // testCompile libraries["groovy-all"]
+ // testCompile libraries["spock-core"]
}
+Index: thredds-4.6.10/buildSrc/src/test/groovy/edu/ucar/build/ui/ToolsUiJnlpExtensionTaskSpec.groovy
+===================================================================
+--- thredds-4.6.10.orig/buildSrc/src/test/groovy/edu/ucar/build/ui/ToolsUiJnlpExtensionTaskSpec.groovy
++++ /dev/null
+@@ -1,138 +0,0 @@
+-package edu.ucar.build.ui
+-
+-import org.gradle.api.JavaVersion
+-import org.gradle.api.Project
+-import org.gradle.testfixtures.ProjectBuilder
+-import org.gradle.testkit.runner.GradleRunner
+-import org.gradle.testkit.runner.TaskOutcome
+-import org.gradle.testkit.runner.internal.PluginUnderTestMetadataReading
+-import org.junit.Rule
+-import org.junit.rules.TemporaryFolder
+-import org.xmlunit.builder.DiffBuilder
+-import org.xmlunit.builder.Input
+-import org.xmlunit.diff.Diff
+-import spock.lang.Specification
+-
+-/**
+- * Tests ToolsUiJnlpExtensionTask.
+- *
+- * @author cwardgar
+- * @since 2017-04-05
+- */
+-class ToolsUiJnlpExtensionTaskSpec extends Specification {
+- private static Project rootProject
+-
+- def setupSpec() {
+- rootProject = new ProjectBuilder().withName('root').build()
+- rootProject.with {
+- version = '1.5'
+-
+- apply plugin: 'java'
+- targetCompatibility = JavaVersion.VERSION_1_7
+-
+- repositories {
+- jcenter()
+- }
+- dependencies {
+- compile 'org.slf4j:slf4j-api:1.7.7'
+- compile 'org.objenesis:objenesis:2.2'
+- runtime 'org.hamcrest:hamcrest-core:1.3'
+- testRuntime 'org.codehaus.groovy:groovy-all:2.4.5'
+- }
+- }
+- }
+-
+- @Rule TemporaryFolder tempFolder
+-
+- def "just the writer"() {
+- setup: "Identify control file for this test. It's located in src/test/resources/edu/ucar/build/ui/"
+- String controlFileName = 'toolsUiJnlpExtension.jnlp'
+-
+- and: "Create a temp file that'll be deleted at the end. It has same name as control file, but different path."
+- File tempFile = tempFolder.newFile(controlFileName)
+-
+- and: "create a writer with the specified properties"
+- ToolsUiJnlpExtensionTask.Writer writer = new ToolsUiJnlpExtensionTask.Writer()
+- writer.with {
+- codebase = "https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/webstart"
+- applicationVersion = rootProject.version
+- applicationJarName = rootProject.jar.archiveName
+- dependenciesConfig = rootProject.configurations.runtime
+- outputFile = tempFile
+- }
+-
+- and: "write JNLP to disk"
+- writer.write()
+-
+- when: "compare expected XML (read from test resource) with just-written file, ignoring comments and whitespace"
+- Diff diff = DiffBuilder.compare(Input.fromStream(getClass().getResourceAsStream(controlFileName)))
+- .withTest(Input.fromFile(tempFile))
+- .ignoreComments()
+- .normalizeWhitespace()
+- .build()
+-
+- then: "there will be no difference between the two"
+- !diff.hasDifferences()
+- }
+-
+- // This reads from a file generated by the java-gradle-plugin.
+- // It is intended for use with GradleRunner.withPluginClasspath(), but that doesn't quite work for us because
+- // we're not testing a plugin here; only the code in :buildSrc. So instead, we're going to feed those files
+- // into the test build's buildscript classpath.
+- List<File> buildSrcClasspath = PluginUnderTestMetadataReading.readImplementationClasspath()
+-
+- def "full Gradle build"() {
+- setup: "variables"
+- String taskName = 'toolsUiJnlpExtension'
+- File outputFile = tempFolder.newFile('testNetCDFtoolsExtraJars.jnlp')
+-
+- and: "declare initial content of build file"
+- String buildFileContent = """
+- buildscript {
+- dependencies {
+- // Need this in order to resolve ToolsUiJnlpExtensionTask.
+- String buildSrcClasspathAsCsvString = '${buildSrcClasspath.join(',').replace('\\\\', '/')}'
+- classpath files(buildSrcClasspathAsCsvString.split(','))
+- }
+- }
+-
+- apply plugin: 'java'
+- targetCompatibility = '1.7'
+-
+- repositories {
+- jcenter()
+- }
+- dependencies {
+- compile 'org.slf4j:slf4j-api:1.7.7'
+- compile 'org.objenesis:objenesis:2.2'
+- runtime 'org.hamcrest:hamcrest-core:1.3'
+- testRuntime 'org.codehaus.groovy:groovy-all:2.4.5'
+- }
+-
+- task $taskName(type: edu.ucar.build.ui.ToolsUiJnlpExtensionTask) {
+- codebase = 'https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/webstart'
+- outputFile = file('${outputFile.name}')
+- }
+- """
+-
+- and: "create a temporary build file containing that content"
+- File buildFile = tempFolder.newFile('build.gradle')
+- buildFile.text = buildFileContent
+-
+- and: "setup a GradleRunner that will execute '$taskName'"
+- GradleRunner gradleRunner = GradleRunner.create().withProjectDir(tempFolder.root).withArguments(":$taskName")
+-
+- expect: "if we execute the task, it will succeed"
+- gradleRunner.build().task(":$taskName")?.outcome == TaskOutcome.SUCCESS
+-
+- and: "if we re-execute the task without changing anything, it'll be UP-TO-DATE"
+- gradleRunner.build().task(":$taskName")?.outcome == TaskOutcome.UP_TO_DATE
+-
+- when: "we update a dependency, which will change the runtime configuration Input that the task uses by default"
+- buildFile.text = buildFileContent.replace("compile 'org.slf4j:slf4j-api:1.7.7'",
+- "compile 'org.slf4j:slf4j-api:1.7.8'")
+-
+- then: "test will not be UP-TO-DATE and will have to run again"
+- gradleRunner.build().task(":$taskName")?.outcome == TaskOutcome.SUCCESS
+- }
+-}
diff --git a/debian/rules b/debian/rules
index bf427a7..81cb5a4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,3 +2,7 @@
%:
dh $@ --with=maven-repo-helper
+
+override_dh_auto_clean:
+ dh_auto_clean
+ find buildSrc/src/test -name '*.groovy' -delete
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/thredds.git
More information about the debian-science-commits
mailing list