Commit c1b883f0 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 18.08~pre+git20180805.da55947+dfsg

parent d272b34a
Loading
Loading
Loading
Loading

.checkstyle

0 → 100644
+9 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<fileset-config file-format-version="1.2.0" simple-config="false">
    <local-check-config name="CISD Checks" location="/build_resources/checkstyle/cisd_checkstyle.xml" type="project" description="">
        <additional-data name="protect-config-file" value="false"/>
    </local-check-config>
    <fileset name="all" enabled="true" check-config-name="CISD Checks" local="true">
        <file-match-pattern match-pattern=".+ch/systemsx/cisd.+" include-pattern="true"/>
    </fileset>
</fileset-config>

.classpath

0 → 100644
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="source/java"/>
	<classpathentry kind="src" path="sourceExamples/java"/>
	<classpathentry kind="src" path="sourceTest/java"/>
	<classpathentry kind="lib" path="/libraries/commons-lang/commons-lang.jar" sourcepath="/libraries/commons-lang/src.zip"/>
	<classpathentry kind="lib" path="/libraries/commons-io/commons-io.jar" sourcepath="/libraries/commons-io/src.zip"/>
	<classpathentry kind="lib" path="/libraries/cisd-args4j/cisd-args4j.jar"/>
	<classpathentry kind="lib" path="/libraries/restrictionchecker/restrictions.jar"/>
	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
	<classpathentry kind="lib" path="/libraries/testng/testng-jdk15.jar" sourcepath="/libraries/testng/src.zip"/>
	<classpathentry kind="lib" path="/libraries/jmock/jmock.jar"/>
	<classpathentry kind="lib" path="/libraries/jmock/hamcrest/hamcrest-core.jar"/>
	<classpathentry kind="lib" path="/libraries/jmock/hamcrest/hamcrest-integration.jar"/>
	<classpathentry kind="lib" path="/libraries/jmock/hamcrest/hamcrest-library.jar"/>
	<classpathentry kind="lib" path="/libraries/jmock/objenesis/objenesis-1.0.jar"/>
	<classpathentry kind="lib" path="libs"/>
	<classpathentry kind="lib" path="/libraries/sis-base/sis-base.jar" sourcepath="/libraries/sis-base/sis-base-src.zip"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="output" path="targets/classes"/>
</classpath>

.gitignore

0 → 100644
+9 −0
Original line number Diff line number Diff line
/bin
/build
/.gradle
/targets
/.project
/.settings
/test-output
/source/c/build
source/c/hdf5*tar*

.shadow_dependencies

0 → 100644
+4 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="lib" path="/libraries/unix"/>
</classpath>

build.gradle

0 → 100644
+291 −0
Original line number Diff line number Diff line
apply from: 'javaproject.gradle'

group='sis'
sourceCompatibility='1.8'
targetCompatibility='1.8'

dependencies {
    compile 'cisd:cisd-args4j:+',
            'cisd:cisd-base:+',
            'rinn:restrictions:+'
    
    testCompile 'testng:testng:+',
                'jmock:jmock:+'
}

tasks.withType(Test) {
    systemProperty "java.library.path", "libs/native/jhdf5/amd64-Linux:libs/native/jhdf5/amd64-Linux:libs/native/jhdf5/x86_64-Mac OS X:libs/native/jhdf5/x86_64-Mac OS X"
}

// Eclipse Gradle plugin always uses the default JRE, so we need to explicitly set it to 1.7.
// (https://issues.gradle.org/browse/GRADLE-3100)
eclipse {
    classpath {
         containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
         containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7'
    }
}

jar {
    baseName "${project.group}-jhdf5-core"
    from (sourceSets.main.output.classesDir) { 
        exclude('ch/systemsx/cisd/hdf5/h5ar') 
        exclude('ch/systemsx/cisd/hdf5/io')
    }
    from('targets/dist') {
        include 'BUILD*INFO'
    }    
    manifest {
        attributes 'Main-Class': 'ch.systemsx.cisd.hdf5.BuildAndEnvironmentInfo'
        attributes 'Class-Path': configurations.runtime.collect { it.getName() }.join(' ')
    }
    
}

task nativeJarLinuxIntel(type: Jar) {
    archiveName 'hdf5-linux-intel.jar'
    from ("libs") {
        include 'native/jhdf5/amd64-Linux/**/*'
        include 'native/jhdf5/arm-Linux/**/*'
    }
    
    from('targets/dist') {
        include 'BUILD*INFO'
    }    
}

task nativeJarMacIntel(type: Jar) {
    archiveName 'hdf5-macosx-intel.jar'
    from ("libs") {
        include 'native/jhdf5/x86_64-Mac OS X/**/*'
    }
    
    from('targets/dist') {
        include 'BUILD*INFO'
    }    
}

task nativeJarWindowsIntel(type: Jar) {
    archiveName 'hdf5-windows-intel.jar'
    from ("libs") {
        include 'native/jhdf5/amd64-Windows/**/*'
    }
    
    from('targets/dist') {
        include 'BUILD*INFO'
    }    
}

task toolsJar(type: Jar, dependsOn: [compileJava]) {
    baseName "${project.group}-jhdf5-tools"
    from (sourceSets.main.output.classesDir) {
        include('ch/systemsx/cisd/hdf5/h5ar/**/*') 
        include('ch/systemsx/cisd/hdf5/io/**/*') 
    }
    
    from('targets/dist') {
        include 'BUILD*INFO'
    }    
    
    manifest {
        attributes 'Main-Class': 'ch.systemsx.cisd.hdf5.h5ar.HDF5ArchiverMain'
        attributes 'Class-Path': configurations.runtime.collect { it.getName() }.join(' ') + " ${project.group}-jhdf5-core.jar " + [nativeJarLinuxIntel, nativeJarMacIntel, nativeJarWindowsIntel].collect {it.archiveName}.join(' ')
    }
}

task allJar(type: Jar, dependsOn: [compileJava]) {
    baseName "${project.group}-jhdf5"

    from (sourceSets.main.output.classesDir) {
        include '**/*'
    }

    from (configurations.runtime.collect {zipTree(it)}) {
        exclude 'native/**/*'
        exclude 'BUILD-*.INFO'
    }

    from('targets/dist') {
        include 'BUILD*INFO'
    }    
    
    manifest {
        attributes 'Main-Class': 'ch.systemsx.cisd.hdf5.h5ar.HDF5ArchiverMain'
        attributes 'Class-Path': [nativeJarLinuxIntel, nativeJarMacIntel, nativeJarWindowsIntel].collect {it.archiveName}.join(' ')
    }
}


task batteriesIncluded(type: Jar, dependsOn: [allJar, nativeJarLinuxIntel, nativeJarMacIntel, nativeJarWindowsIntel]) {
    archiveName "${project.group}-jhdf5-batteries_included.jar"
    from (zipTree(allJar.archivePath)) {
        include '**/*'
    }
    
    from (configurations.runtime.collect {zipTree(it)}) {
        include 'native/**/*'
    }

    from (zipTree(nativeJarLinuxIntel.archivePath)) {
        include 'native/**/*'
    }
    from (zipTree(nativeJarMacIntel.archivePath)) {
        include 'native/**/*'
    }
    from (zipTree(nativeJarWindowsIntel.archivePath)) {
        include 'native/**/*'
    }
    
    manifest {
        attributes 'Main-Class': 'ch.systemsx.cisd.hdf5.h5ar.HDF5ArchiverMain'
    }
}

task myJavadoc(type: Javadoc) {
	source = [ sourceSets.main.allJava, "base-src" ]
	classpath = configurations.compile
	options.memberLevel = JavadocMemberLevel.PUBLIC
	options.overview = "overview.html"
	include "ch/systemsx/cisd/hdf5/**"
	include "ch/ethz/sis/hdf5/**"
	include "hdf/hdf5lib/exceptions/**"
	exclude "ch/systemsx/cisd/hdf5/hdf5lib/**"
	exclude "ch/ethz/sis/hdf5/hdf5lib/**"
	exclude "ch/systemsx/cisd/hdf5/cleanup/**"
	exclude "ch/systemsx/cisd/hdf5/BitSetConversionUtils.java"
	exclude "ch/systemsx/cisd/hdf5/MatrixUtils.java"
	exclude "ch/systemsx/cisd/hdf5/StringUtils.java"
	exclude "ch/systemsx/cisd/hdf5/PaddingUtils.java"
	exclude "ch/systemsx/cisd/hdf5/ReflectionUtils.java"
}

task javadocZip(type: Zip, dependsOn: myJavadoc) {
    archiveName "${project.group}-jhdf5-javadoc.zip"
    from javadoc.destinationDir
}

task exampleZip(type: Jar) {
    archiveName "${project.group}-jhdf5-examples-src.zip"

    from ("sourceExamples/java") {
        include '**/*'
    }
    
    from ("targets/dist") {
        include "BUILD-jhdf5.INFO"
    }
}

task distributionZip(type: Zip, dependsOn: [jar, toolsJar, allJar, nativeJarLinuxIntel, nativeJarMacIntel, nativeJarWindowsIntel, batteriesIncluded, javadocZip, sourcesJar, exampleZip]) {
    baseName "${project.group}-jhdf5"

    from (jar.archivePath) {
        into "${project.group}-jhdf5/lib"
        rename '(.*)', "${project.group}-jhdf5-core.jar"
    }
    
    from (toolsJar.archivePath) {
        into "${project.group}-jhdf5/lib"
        rename '(.*)', "${project.group}-jhdf5-tools.jar"
    }

    from (allJar.archivePath) {
        into "${project.group}-jhdf5/lib"
        rename '(.*)', "${project.group}-jhdf5.jar"
    }
    
    from (configurations.runtime) {
        exclude '*restriction*'
        exclude '*bcel*'
        into "${project.group}-jhdf5/lib"
    }
    
    from (zipTree(batteriesIncluded.archivePath)) {
        into "${project.group}-jhdf5/lib"
        include 'native/**'
    }
    
    from (nativeJarLinuxIntel.archivePath) {
        into "${project.group}-jhdf5/lib/nativejar"
    }
    
    from (nativeJarMacIntel.archivePath) {
        into "${project.group}-jhdf5/lib/nativejar"
    }
    
    from (nativeJarWindowsIntel.archivePath) {
        into "${project.group}-jhdf5/lib/nativejar"
    }

    from (batteriesIncluded.archivePath) {
        into "${project.group}-jhdf5/lib/batteries_included"
    }

    from ("dist") {
        into "${project.group}-jhdf5"
    }
    
    from (javadocZip.archivePath) {
        into "${project.group}-jhdf5/doc"
    }
    
    from (exampleZip.archivePath) {
        into "${project.group}-jhdf5/doc"
    }    
    
    from (sourcesJar.archivePath) {
        into "${project.group}-jhdf5/src"
        rename '(.*)', "${project.group}-jhdf5-src.zip"
    }

	// BR 2014-06-09:
	// This is a workaround for an issue in Gradle: if one of entries from a jar file gets extraced read-only, 
	// overwriting it in a subsequent run will fail. It should be fixed in a future version of Gradle.
	// See http://forums.gradle.org/gradle/topics/ziptree_unable_to_overwrite_temporary_read_only_files 
    doLast {
        exec {
            commandLine = "chmod -R u+w $buildDir/tmp/expandedArchives".tokenize()
        }
    }

}

if (project == project.rootProject)
{
    publishing {
        publications {
            artifacts(IvyPublication) {
                module "${project.group}-jhdf5"
                revision project.revisionForPublication
                from components.java
                artifact(toolsJar) {
                    name = "${project.group}-jhdf5-tools"
                    conf = "runtime"
                }
                artifact(nativeJarLinuxIntel) {
                    name = "hdf5-linux-intel"
                    conf = "runtime"
                }
                artifact(nativeJarMacIntel) {
                    name = "hdf5-macosx-intel"
                    conf = "runtime"
                }
                artifact(nativeJarWindowsIntel) {
                    name = "hdf5-windows-intel"
                    conf = "runtime"
                }
                artifact(sourcesJar) {
                    type = "source"
                }
                descriptor {
                    withXml {
                        asNode().dependencies.dependency.find { it.@org == 'rinn' }.replaceNode {}
                    }
                }
            }
        }
    }
}

build.dependsOn distributionZip
Loading