|
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 guapply plugin: e available at https://docs.gradle.org/3.5/userguapply plugin: e/java_library_plugin.html |
7 | | - */ |
8 | | - |
9 | | -// Apply the java-library plugin to add support for Java Library |
10 | | -apply plugin: 'java-library' |
11 | 1 | apply plugin: 'java' |
12 | | -apply plugin: 'checkstyle' |
13 | | -apply plugin: 'findbugs' |
14 | | -apply plugin: 'pmd' |
15 | | -apply plugin: 'jacoco' |
16 | | -//apply plugin: 'net.researchgate.release' version '2.4.0' |
17 | | -//apply plugin: "com.jfrog.bintray" version '1.7' |
18 | | -apply plugin: 'maven' |
19 | | -apply plugin: 'maven-publish' |
| 2 | +apply plugin: 'distribution' |
| 3 | +apply plugin: 'org.unbroken-dome.test-sets' |
20 | 4 |
|
21 | 5 | ext { |
22 | | - //kafkaVersion = '0.10.0.0' |
23 | | - //kafkaVersion = '0.11.0.0' |
24 | | - //kafkaVersion = '1.1.0' |
25 | | - kafkaVersion = '2.0.0' |
| 6 | + kafkaVersion = '2.4.1' |
| 7 | + solaceJavaAPIVersion = '10.6.0' |
26 | 8 | } |
27 | 9 |
|
28 | | -// In this section you declare where to find the dependencies of your project |
29 | 10 | repositories { |
30 | | - // Use jcenter for resolving your dependencies. |
31 | | - // You can declare any Maven/Ivy/file repository here. |
32 | | - jcenter() |
| 11 | + mavenLocal() |
| 12 | + mavenCentral() |
33 | 13 | } |
34 | 14 |
|
35 | | -dependencies { |
36 | | - // This dependency is exported to consumers, that is to say found on their compile classpath. |
37 | | - api 'org.apache.commons:commons-math3:3.6.1' |
38 | | - |
39 | | - // This dependency is used internally, and not exposed to consumers on their own compile classpath. |
40 | | - implementation 'com.google.guava:guava:21.0' |
41 | | - |
42 | | - // Use JUnit test framework |
43 | | - testImplementation 'junit:junit:4.12' |
| 15 | +buildscript { |
| 16 | + repositories { |
| 17 | + maven { |
| 18 | + url "https://plugins.gradle.org/m2/" |
| 19 | + } |
| 20 | + } |
| 21 | + dependencies { |
| 22 | + classpath "com.github.spotbugs:spotbugs-gradle-plugin:3.0.0" |
| 23 | + classpath "org.unbroken-dome.test-sets:org.unbroken-dome.test-sets.gradle.plugin:2.2.1" |
| 24 | + } |
44 | 25 | } |
45 | 26 |
|
46 | | -// In this section you declare where to find the dependencies of your project |
47 | | -repositories { |
48 | | - // Use jcenter for resolving your dependencies. |
49 | | - // You can declare any Maven/Ivy/file repository here. |
50 | | - jcenter() |
51 | | - mavenCentral() |
52 | | - |
53 | | - maven { url "https://mvnrepository.com/artifact/com.solacesystems/sol-jcsmp" } |
54 | | - // https://mvnrepository.com/artifact/com.solacesystems/sol-jcsmp |
55 | | - |
56 | | - |
| 27 | +testSets { |
| 28 | + integrationTest |
57 | 29 | } |
58 | 30 |
|
59 | 31 | dependencies { |
60 | | - // This dependency is exported to consumers, that is to say found on their compile classpath. |
61 | | - //api 'org.apache.commons:commons-math3:3.6.1' |
62 | | - |
63 | | - // This dependency is used internally, and not exposed to consumers on their own compile classpath. |
64 | | - implementation 'com.google.guava:guava:21.0' |
65 | | - |
66 | | - // Use JUnit test framework |
67 | | - testImplementation 'junit:junit:4.12' |
68 | | - |
69 | | - testCompile group: 'junit', name: 'junit', version: '4.12' |
| 32 | + integrationTestImplementation 'junit:junit:4.12' |
| 33 | + integrationTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.2' |
| 34 | + integrationTestImplementation 'org.junit.jupiter:junit-jupiter-engine:5.5.2' |
| 35 | + integrationTestImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.2' |
| 36 | + integrationTestImplementation 'org.junit.platform:junit-platform-engine:1.5.2' |
| 37 | + integrationTestImplementation 'org.mockito:mockito-core:3.2.4' |
| 38 | + integrationTestImplementation 'org.mockito:mockito-junit-jupiter:3.2.4' |
| 39 | + integrationTestImplementation 'org.testcontainers:testcontainers:1.12.4' |
| 40 | + integrationTestImplementation 'org.testcontainers:junit-jupiter:1.12.4' |
| 41 | + integrationTestImplementation 'org.slf4j:slf4j-api:1.7.28' |
| 42 | + integrationTestImplementation 'org.slf4j:slf4j-simple:1.7.28' |
| 43 | + integrationTestImplementation 'org.apache.commons:commons-configuration2:2.6' |
| 44 | + integrationTestImplementation 'commons-beanutils:commons-beanutils:1.9.4' |
| 45 | + integrationTestImplementation 'com.google.code.gson:gson:2.3.1' |
| 46 | + integrationTestImplementation 'commons-io:commons-io:2.4' |
| 47 | + integrationTestImplementation 'com.squareup.okhttp3:okhttp:4.4.0' |
| 48 | + integrationTestImplementation 'org.apache.kafka:kafka-clients:$kafkaVersion' |
70 | 49 | compile "org.apache.kafka:connect-api:$kafkaVersion" |
71 | | - compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2' |
72 | | - compile 'org.bouncycastle:bcprov-jdk15on:1.54' |
73 | | - compile 'org.bouncycastle:bcpkix-jdk15on:1.54' |
74 | | - compile 'org.bouncycastle:bcpg-jdk15on:1.54' |
75 | | - compile 'commons-io:commons-io:2.4' |
76 | | - compile 'org.slf4j:slf4j-api:1.7.14' |
77 | | - testCompile 'org.slf4j:slf4j-simple:1.7.14' |
78 | | - compile group: 'com.solacesystems', name: 'sol-jcsmp', version: '10.4.0' |
79 | | - //compile 'com.puppycrawl.tools:checkstyle:8.12' |
| 50 | + compile "com.solacesystems:sol-jcsmp:$solaceJavaAPIVersion" |
80 | 51 | } |
81 | 52 |
|
82 | | -tasks.withType(FindBugs) { |
83 | | - reports { |
84 | | - xml.enabled = true |
85 | | - html.enabled = false |
| 53 | +task('prepDistForIntegrationTesting') { |
| 54 | + dependsOn assembleDist |
| 55 | + doLast { |
| 56 | + copy { |
| 57 | + from zipTree(file('build/distributions').listFiles().findAll {it.name.endsWith('.zip')}[0]) |
| 58 | + into (file('src/integrationTest/resources')) |
| 59 | + } |
| 60 | + copy { |
| 61 | + from zipTree(file('build/distributions').listFiles().findAll {it.name.endsWith('.zip')}[0]) |
| 62 | + into (file('build/resources/integrationTest')) |
| 63 | + } |
86 | 64 | } |
87 | 65 | } |
88 | 66 |
|
89 | | -task copyRuntimeLibs(type: Copy) { |
90 | | - into "$buildDir/output/lib" |
91 | | - from configurations.runtime |
| 67 | +project.integrationTest { |
| 68 | + useJUnitPlatform() |
| 69 | + outputs.upToDateWhen { false } |
| 70 | + dependsOn prepDistForIntegrationTesting |
92 | 71 | } |
93 | 72 |
|
94 | | -checkstyle { |
95 | | - repositories { |
96 | | - mavenCentral() |
97 | | - } |
98 | | - configurations { |
99 | | - checkstyle |
| 73 | +distributions { |
| 74 | + main { |
| 75 | + contents { |
| 76 | + from('etc/solace_source.properties') { into 'etc' } |
| 77 | + from('etc/solace_source_properties.json') { into 'etc' } |
| 78 | + from('doc/distribution-readme.md') { into 'doc' } |
| 79 | + from('LICENSE') { into 'doc' } |
| 80 | + into('lib') { |
| 81 | + from jar |
| 82 | + from(project.configurations.runtime) |
| 83 | + } |
| 84 | + // from jar |
| 85 | + } |
100 | 86 | } |
101 | | - dependencies { |
102 | | - //checkstyle 'com.puppycrawl.tools:checkstyle:6.12.1' |
103 | | - checkstyle 'com.puppycrawl.tools:checkstyle:8.12' |
104 | | - |
105 | | - } |
106 | | -} |
107 | | - |
108 | | -processResources { |
109 | | - expand project.properties |
110 | 87 | } |
0 commit comments