Subversion Repositories DevTools

Rev

Rev 7189 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6914 dpurdie 1
/*
2
 * This build file was generated by the Gradle 'init' task.
3
 *
4
 * This generated file contains a sample Java Library project to get you started.
5
 * For more details take a look at the Java Libraries chapter in the Gradle
6
 * user guide available at https://docs.gradle.org/3.5/userguide/java_library_plugin.html
7
 */
8
 
9
// Configure plugins
10
plugins {
11
 id 'java-library' 		// This is a Java project
12
 id 'eclipse-wtp' 		// Support for import to eclipse
13
 id 'idea' 				// Support for import to intelli-j
14
}
15
 
16
//	This project must use 1.6 for compatability with some Solaris Build Machines
17
java {
18
		sourceCompatibility = JavaVersion.VERSION_1_6
19
		targetCompatibility = JavaVersion.VERSION_1_6
20
}
21
 
22
// Apply the java-library plugin to add support for Java Library
23
apply from: 'interface/jats.gradle'
24
 
25
// In this section you declare where to find the dependencies of your project
26
// JATS - DO NOT HAVE REPO
27
//repositories {
28
    // Use jcenter for resolving your dependencies.
29
    // You can declare any Maven/Ivy/file repository here.
30
    //jcenter()
31
//}
32
 
33
configurations {
34
	runTimeLibs	// configuration that holds jars to copy into lib - Runtime dependecies
35
}
36
 
37
dependencies {
38
    // Main Dependencies
39
    //compile jats('interface')
40
    compile jats('apache-ant')
41
    compile jats('javaxmail')
42
    compile jats('ojdbc')
43
    compile jats('j2ssh-maverick')
7033 dpurdie 44
    implementation 'org.slf4j:slf4j-api:1.7+'
7189 dpurdie 45
    implementation 'junit:junit:4.12'
46
    implementation 'org.slf4j:slf4j-log4j12:1.7+'
6914 dpurdie 47
 
48
	// Specify libs to be embedded into the main jar file
49
	runTimeLibs 'apache-ant:ant'
50
	runTimeLibs 'apache-ant:ant-launcher'
51
	runTimeLibs 'javaxmail:mail'
52
	runTimeLibs 'ojdbc:ojdbc6' 
7033 dpurdie 53
	runTimeLibs 'log4j:log4j:1.2.17+'
54
	runTimeLibs 'org.slf4j:slf4j-api:1.7+'
55
	runTimeLibs 'org.slf4j:slf4j-log4j12:1.7+'
6914 dpurdie 56
	runTimeLibs 'j2ssh-maverick:j2ssh-maverick-1.5.2'
57
	runTimeLibs 'j2ssh-maverick:jzlib-1.1.3'
58
	runTimeLibs 'j2ssh-maverick:oro-2.0.8'
59
 
60
}
61
 
62
//  Prevent the project jar from being built
63
//  This project builds bunch of jars and does not need to project jar
64
jar.enabled = false
65
 
66
// Build individual jars
67
task ant_abt(type: Jar) {
7489 dpurdie 68
	archiveBaseName = 'ant-abtD'
69
	archiveVersion = ''
6914 dpurdie 70
	from(sourceSets.main.output) {
71
		include 'com/erggroup/buildtool/abt/**'
72
	}
73
	 manifest {
74
		attributes (
75
			'Implementation-Title' 		: 'com.erggroup.buildtool.ant-abt'
76
		)
77
	}
78
}
79
 
80
task abtd(type: Jar) {
7489 dpurdie 81
	archiveBaseName = 'abtdD'
82
	archiveVersion = ''
6914 dpurdie 83
	from(sourceSets.main.output) {
84
		include 'com/erggroup/buildtool/daemon/**'
85
	}
86
	manifest {
87
		attributes (
88
			'Main-Class': 'com.erggroup.buildtool.daemon.BuildDaemon',
89
			'Implementation-Title' : 'com.erggroup.buildtool.abt',
7033 dpurdie 90
			'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'
6914 dpurdie 91
		)
92
	}
93
}
94
task escrow(type: Jar) {
7489 dpurdie 95
	archiveBaseName = 'escrowD'
96
	archiveVersion = ''
6914 dpurdie 97
	from(sourceSets.main.output) {
98
		include 'com/erggroup/buildtool/escrow/**'
99
	}
100
	manifest {
101
		attributes (
102
			'Implementation-Title' : 'com.erggroup.buildtool.escrow',
103
			'Main-Class': 'com.erggroup.buildtool.escrow.ESCROWBuild',
7033 dpurdie 104
			'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'
6914 dpurdie 105
		)
106
	}
107
}
108
 
109
task indef(type: Jar) {
7489 dpurdie 110
	archiveBaseName = 'indefD'
111
	archiveVersion = ''
6914 dpurdie 112
	from(sourceSets.main.output) {
113
		include 'com/erggroup/buildtool/indef/**'
114
	}
115
	manifest {
116
		attributes (
117
			'Implementation-Title' : 'com.erggroup.buildtool.indef',
118
			'Main-Class': 'com.erggroup.buildtool.indef.Indef',
119
			'Class-Path': 'rippleEngineD.jar classes12.jar log4j-1.2.14.jar'
120
		)
121
	}
122
}
123
 
124
task rippleEngine(type: Jar) {
7489 dpurdie 125
	archiveBaseName = 'rippleEngineD'
126
	archiveVersion = ''
6914 dpurdie 127
	from(sourceSets.main.output) {
128
		include 'com/erggroup/buildtool/ripple/**'
129
	}
130
	manifest {
131
	}
132
}
133
 
134
task smtp(type: Jar) {
7489 dpurdie 135
	archiveBaseName = 'smtpD'
136
	archiveVersion = ''
6914 dpurdie 137
	from(sourceSets.main.output) {
138
		include 'com/erggroup/buildtool/smtp/**'
139
	}
140
	manifest {
141
		attributes (
142
			'Implementation-Title' : 'com.erggroup.buildtool.smtp'
143
		)
144
	}
145
 
146
}
147
 
148
task utilities(type: Jar) {
7489 dpurdie 149
	archiveBaseName = 'utilitiesD'
150
	archiveVersion = ''
6914 dpurdie 151
	from(sourceSets.main.output) {
152
		include 'com/erggroup/buildtool/utilities/**'
153
	}
154
	manifest {
155
		attributes (
156
			'Implementation-Title' : 'com.erggroup.buildtool.utilities'
157
		)
158
	}
159
}
160
 
161
task config(type: Jar) {
7489 dpurdie 162
	archiveBaseName = 'configD'
163
	archiveVersion = ''
6914 dpurdie 164
	from(sourceSets.main.output) {
165
		include 'com/erggroup/buildtool/util/**'
166
	}
167
	manifest {
168
		attributes (
169
			'Implementation-Title' : 'com.erggroup.buildtool.util'
170
		)
171
	}
172
}
173
 
174
 
175
//  Package the files we want to export
176
//      The files are placed directly int the Jats packaging directory
177
//      This avoids the need for a Jats directive to do the packaging
178
task packageFiles(type: Copy) {
179
	dependsOn ant_abt, abtd, escrow, indef, rippleEngine, smtp, utilities, config
180
 
181
    into project.ext.pkgBaseDir + '/etc'
182
 
183
    from  configurations.runTimeLibs.files
184
    from  ("${buildDir}/libs") {
185
		include '*.jar'
186
        exclude '**/indef*.jar'
187
	}
188
}
189
 
190
build.dependsOn packageFiles
191
 
192
def void explainMe(it){
193
    //println "Examining $it.name:"
194
    println "Meta:"
195
    println it.metaClass.metaMethods*.name.sort().unique()
196
    println "Methods:"
197
    println it.metaClass.methods*.name.sort().unique()
198
    println "Depends On:"
199
    //println it.dependsOn.collect({it*.getName()})
200
    println "Properties:"
201
    println it.properties.entrySet()*.toString()
202
        .sort().toString().replaceAll(", ","\n")
203
}
204
 
205
//explainMe(configurations.archives)
206