blob: 6db7598833b4e28a008ef8ee855ede3ac005e988 [file] [log] [blame]
/**
* Copyright 2015 IBM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//
// Licensed Materials - Property of IBM
// © Copyright IBM Corp. 2015
//
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'eclipse'
mainClassName = 'com.ibm.matos.Utils'
sourceCompatibility = 1.8
targetCompatibility = 1.8
version = '1.0'
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.apache.kafka', name: 'kafka-clients', version: '0.10.0.1'
compile 'log4j:log4j:1.2.17'
compile 'org.slf4j:slf4j-log4j12:1.7.6'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.0-rc1'
compile 'com.ibm.stocator:stocator:1.0.4'
compile 'org.javaswift:joss:0.9.12'
compile 'com.google.code.gson:gson:2.7'
}
// Compile source code
compileJava {
source = 'src'
options.encoding = 'ISO-8859-1'
}
// Save JAR in build directory.
uploadArchives {
repositories {
flatDir {
dirs 'build'
}
}
}
//create a single Jar with all dependencies
task oneJar(type: Jar) {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
copy {
from 'resources/log4j.properties'
into '.'
}
from ('.') {
include 'log4j.properties'
include 'resources/*'
}
with jar
}
task jarLoader (type: Jar) {
doFirst {
baseName = project.name + '-load'
manifest {
attributes('Main-Class': 'com.ibm.matos.Load')
}
exclude '**/matos/Monitor*'
exclude '**/matos/Batch*'
}
with oneJar
}
task jarMonitor (type: Jar) {
doFirst {
baseName = project.name + '-monitor'
manifest {
attributes('Main-Class': 'com.ibm.matos.Monitor')
}
exclude '**/matos/Load*'
exclude '**/matos/Batch*'
}
with oneJar
}
task jarBatch (type: Jar) {
doFirst {
baseName = project.name + '-batch'
manifest {
attributes('Main-Class': 'com.ibm.matos.Batch')
}
exclude '**/matos/Load*'
exclude '**/matos/Monitor*'
}
with oneJar
}