|
| 1 | +apply plugin: 'java' |
| 2 | +apply plugin: 'maven' |
| 3 | +apply plugin: 'com.github.johnrengelman.shadow' |
| 4 | + |
| 5 | +group = 'at.grahsl.kafka.connect' |
| 6 | +version = '1.1.0-SNAPSHOT' |
| 7 | + |
| 8 | +description = """kafka-connect-mongodb""" |
| 9 | + |
| 10 | +sourceCompatibility = 1.8 |
| 11 | +targetCompatibility = 1.8 |
| 12 | + |
| 13 | +tasks.withType(JavaCompile) { |
| 14 | + options.encoding = 'UTF-8' |
| 15 | +} |
| 16 | + |
| 17 | +buildscript { |
| 18 | + repositories { |
| 19 | + jcenter() |
| 20 | + } |
| 21 | + dependencies { |
| 22 | + classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.3' |
| 23 | + } |
| 24 | +} |
| 25 | + |
| 26 | +processResources { |
| 27 | + expand(project.properties) |
| 28 | +} |
| 29 | + |
| 30 | +def skipIntegrationTest = 'true' |
| 31 | +test { |
| 32 | + if (skipIntegrationTest.toBoolean()) { |
| 33 | + exclude '**/*IT.class' |
| 34 | + } |
| 35 | +} |
| 36 | + |
| 37 | +task copyJarToTarget(type: Copy, dependsOn:[jar, shadowJar]) { |
| 38 | + description 'Copies jar files to target directory' |
| 39 | + copy { |
| 40 | + from 'build/libs' |
| 41 | + into 'target' |
| 42 | + include '**/*.jar' |
| 43 | + } |
| 44 | +} |
| 45 | + |
| 46 | +repositories { |
| 47 | + maven { url "http://packages.confluent.io/maven/" } |
| 48 | + maven { url "http://repo.maven.apache.org/maven2" } |
| 49 | +} |
| 50 | + |
| 51 | +dependencies { |
| 52 | + compileOnly group: 'org.apache.kafka', name: 'connect-api', version:'1.0.1' |
| 53 | + compile group: 'org.mongodb', name: 'mongodb-driver', version:'3.6.3' |
| 54 | + compile group: 'ch.qos.logback', name: 'logback-classic', version:'1.2.3' |
| 55 | + compile group: 'com.github.jcustenborder.kafka.connect', name: 'connect-utils', version:'[0.2.31,0.2.1000)' |
| 56 | + compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version:'2.9.0' |
| 57 | + compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version:'2.9.0' |
| 58 | + compile group: 'io.confluent', name: 'kafka-avro-serializer', version:'4.0.0' |
| 59 | + compile group: 'com.esotericsoftware.yamlbeans', name: 'yamlbeans', version:'1.12' |
| 60 | + |
| 61 | + testCompile group: 'org.apache.kafka', name: 'connect-api', version:'1.0.1' |
| 62 | + testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.1.0' |
| 63 | + testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-params', version:'5.1.0' |
| 64 | + testCompile group: 'org.junit.vintage', name: 'junit-vintage-engine', version:'5.1.0' |
| 65 | + testCompile group: 'org.junit.platform', name: 'junit-platform-runner', version:'1.1.0' |
| 66 | + testCompile group: 'org.junit.platform', name: 'junit-platform-console', version:'1.1.0' |
| 67 | + testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version:'2.0.0.0' |
| 68 | + testCompile group: 'org.mockito', name: 'mockito-core', version:'2.9.0' |
| 69 | + testCompile group: 'org.testcontainers', name: 'testcontainers', version:'1.4.3' |
| 70 | + testCompile group: 'org.apache.avro', name: 'avro', version:'1.8.2' |
| 71 | + testCompile group: 'org.apache.avro', name: 'avro-maven-plugin', version:'1.8.2' |
| 72 | + testCompile group: 'com.squareup.okhttp3', name: 'okhttp', version:'3.9.1' |
| 73 | + testCompile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version:'2.9.0' |
| 74 | +} |
0 commit comments