Subversion Repositories DevTools

Rev

Rev 7033 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*
 * This build file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java Library project to get you started.
 * For more details take a look at the Java Libraries chapter in the Gradle
 * user guide available at https://docs.gradle.org/3.5/userguide/java_library_plugin.html
 */

// Configure plugins
plugins {
 id 'java-library'              // This is a Java project
 id 'eclipse-wtp'               // Support for import to eclipse
 id 'idea'                              // Support for import to intelli-j
}

//      This project must use 1.6 for compatability with some Solaris Build Machines
java {
                sourceCompatibility = JavaVersion.VERSION_1_6
                targetCompatibility = JavaVersion.VERSION_1_6
}

// Apply the java-library plugin to add support for Java Library
apply from: 'interface/jats.gradle'

// In this section you declare where to find the dependencies of your project
// JATS - DO NOT HAVE REPO
//repositories {
    // Use jcenter for resolving your dependencies.
    // You can declare any Maven/Ivy/file repository here.
    //jcenter()
//}

configurations {
        runTimeLibs     // configuration that holds jars to copy into lib - Runtime dependecies
}

dependencies {
    // Main Dependencies
    //compile jats('interface')
    compile jats('apache-ant')
    compile jats('javaxmail')
    compile jats('ojdbc')
    compile jats('j2ssh-maverick')
    implementation 'org.slf4j:slf4j-api:1.7+'

    compile jats('junit')

        // Specify libs to be embedded into the main jar file
        runTimeLibs 'apache-ant:ant'
        runTimeLibs 'apache-ant:ant-launcher'
        runTimeLibs 'javaxmail:mail'
        runTimeLibs 'ojdbc:ojdbc6' 
        runTimeLibs 'log4j:log4j:1.2.17+'
        runTimeLibs 'org.slf4j:slf4j-api:1.7+'
        runTimeLibs 'org.slf4j:slf4j-log4j12:1.7+'
        runTimeLibs 'j2ssh-maverick:j2ssh-maverick-1.5.2'
        runTimeLibs 'j2ssh-maverick:jzlib-1.1.3'
        runTimeLibs 'j2ssh-maverick:oro-2.0.8'

}

//  Prevent the project jar from being built
//  This project builds bunch of jars and does not need to project jar
jar.enabled = false

// Build individual jars
task ant_abt(type: Jar) {
        baseName = 'ant-abtD'
        from(sourceSets.main.output) {
                include 'com/erggroup/buildtool/abt/**'
        }
         manifest {
                attributes (
                        'Implementation-Title'          : 'com.erggroup.buildtool.ant-abt'
                )
        }
}

task abtd(type: Jar) {
        baseName = 'abtdD'
        from(sourceSets.main.output) {
                include 'com/erggroup/buildtool/daemon/**'
        }
        manifest {
                attributes (
                        'Main-Class': 'com.erggroup.buildtool.daemon.BuildDaemon',
                        'Implementation-Title' : 'com.erggroup.buildtool.abt',
                        'Class-Path' : '. utilitiesD.jar rippleEngineD.jar ant-abtD.jar smtpD.jar ant.jar ant-launcher.jar slf4j-api-1.7.26.jar slf4j-log4j12-1.7.26.jar log4j-1.2.17.jar mail.jar ojdbc6.jar j2ssh-maverick-1.5.2.jar jzlib-1.1.3.jar oro-2.0.8.jar'
                )
        }
}
task escrow(type: Jar) {
        baseName = 'escrowD'
        from(sourceSets.main.output) {
                include 'com/erggroup/buildtool/escrow/**'
        }
        manifest {
                attributes (
                        'Implementation-Title' : 'com.erggroup.buildtool.escrow',
                        'Main-Class': 'com.erggroup.buildtool.escrow.ESCROWBuild',
                        'Class-Path': '. utilitiesD.jar rippleEngineD.jar ojdbc6.jar slf4j-api-1.7.26.jar slf4j-log4j12-1.7.26.jar log4j-1.2.17.jar'
                )
        }
}

task indef(type: Jar) {
        baseName = 'indefD'
        from(sourceSets.main.output) {
                include 'com/erggroup/buildtool/indef/**'
        }
        manifest {
                attributes (
                        'Implementation-Title' : 'com.erggroup.buildtool.indef',
                        'Main-Class': 'com.erggroup.buildtool.indef.Indef',
                        'Class-Path': 'rippleEngineD.jar classes12.jar log4j-1.2.14.jar'
                )
        }
}

task rippleEngine(type: Jar) {
        baseName = 'rippleEngineD'
        from(sourceSets.main.output) {
                include 'com/erggroup/buildtool/ripple/**'
        }
        manifest {
        }
}

task smtp(type: Jar) {
        baseName = 'smtpD'
        from(sourceSets.main.output) {
                include 'com/erggroup/buildtool/smtp/**'
        }
        manifest {
                attributes (
                        'Implementation-Title' : 'com.erggroup.buildtool.smtp'
                )
        }

}

task utilities(type: Jar) {
        baseName = 'utilitiesD'
        from(sourceSets.main.output) {
                include 'com/erggroup/buildtool/utilities/**'
        }
        manifest {
                attributes (
                        'Implementation-Title' : 'com.erggroup.buildtool.utilities'
                )
        }
}

task config(type: Jar) {
        baseName = 'configD'
        from(sourceSets.main.output) {
                include 'com/erggroup/buildtool/util/**'
        }
        manifest {
                attributes (
                        'Implementation-Title' : 'com.erggroup.buildtool.util'
                )
        }
}


//  Package the files we want to export
//      The files are placed directly int the Jats packaging directory
//      This avoids the need for a Jats directive to do the packaging
task packageFiles(type: Copy) {
        dependsOn ant_abt, abtd, escrow, indef, rippleEngine, smtp, utilities, config

    into project.ext.pkgBaseDir + '/etc'

    from  configurations.runTimeLibs.files
    from  ("${buildDir}/libs") {
                include '*.jar'
        exclude '**/indef*.jar'
        }
}

build.dependsOn packageFiles

def void explainMe(it){
    //println "Examining $it.name:"
    println "Meta:"
    println it.metaClass.metaMethods*.name.sort().unique()
    println "Methods:"
    println it.metaClass.methods*.name.sort().unique()
    println "Depends On:"
    //println it.dependsOn.collect({it*.getName()})
    println "Properties:"
    println it.properties.entrySet()*.toString()
        .sort().toString().replaceAll(", ","\n")
}

//explainMe(configurations.archives)