Skip to content

Commit 046407c

Browse files
committed
Formatting build.gradle
1 parent 19e663b commit 046407c

File tree

1 file changed

+91
-89
lines changed

1 file changed

+91
-89
lines changed

build.gradle

Lines changed: 91 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,157 +1,159 @@
11
plugins {
2-
id 'java'
3-
id 'net.saliman.properties' version '1.4.6'
4-
id "com.github.jk1.dependency-license-report" version "1.3"
2+
id 'java'
3+
id 'net.saliman.properties' version '1.4.6'
4+
id "com.github.jk1.dependency-license-report" version "1.3"
55
}
66

77
sourceCompatibility = 1.8
88

99
repositories {
10-
mavenCentral()
11-
jcenter()
10+
mavenCentral()
11+
jcenter()
1212
}
1313

1414
configurations {
15-
documentation
16-
assets
15+
documentation
16+
assets
1717
}
1818

1919
dependencies {
20-
compileOnly "org.apache.kafka:connect-api:2.5.0"
21-
compileOnly "org.apache.kafka:connect-json:2.5.0"
20+
compileOnly "org.apache.kafka:connect-api:2.5.0"
21+
compileOnly "org.apache.kafka:connect-json:2.5.0"
2222

23-
compile "com.marklogic:marklogic-client-api:5.3.0"
24-
compile ("com.marklogic:marklogic-data-hub:5.2.4") {
25-
// Prefer the version above
26-
exclude module: "marklogic-client-api"
27-
// Excluding these because there's no need for them
28-
exclude module: "spring-boot-autoconfigure"
29-
exclude module: "spring-integration-http"
30-
exclude module: "jaeger-core"
31-
exclude module: "jaeger-thrift"
23+
compile "com.marklogic:marklogic-client-api:5.3.0"
24+
compile("com.marklogic:marklogic-data-hub:5.2.4") {
25+
// Prefer the version above
26+
exclude module: "marklogic-client-api"
27+
// Excluding these because there's no need for them
28+
exclude module: "spring-boot-autoconfigure"
29+
exclude module: "spring-integration-http"
30+
exclude module: "jaeger-core"
31+
exclude module: "jaeger-thrift"
3232

33-
// Excluding because it causes Kafka Connect to complain mightily if included
34-
exclude module: "logback-classic"
35-
}
33+
// Excluding because it causes Kafka Connect to complain mightily if included
34+
exclude module: "logback-classic"
35+
}
3636

37-
testCompile "org.junit.jupiter:junit-jupiter-api:5.3.0"
38-
testCompile "org.apache.kafka:connect-api:2.5.0"
39-
testCompile "org.apache.kafka:connect-json:2.5.0"
40-
testCompile "com.google.code.gson:gson:2.8.6"
37+
testCompile "org.junit.jupiter:junit-jupiter-api:5.3.0"
38+
testCompile "org.apache.kafka:connect-api:2.5.0"
39+
testCompile "org.apache.kafka:connect-json:2.5.0"
40+
testCompile "com.google.code.gson:gson:2.8.6"
4141

42-
// Needed by Gradle 4.6+ - see https://www.petrikainulainen.net/programming/testing/junit-5-tutorial-running-unit-tests-with-gradle/
43-
testRuntime "org.junit.jupiter:junit-jupiter-engine:5.3.0"
42+
// Needed by Gradle 4.6+ - see https://www.petrikainulainen.net/programming/testing/junit-5-tutorial-running-unit-tests-with-gradle/
43+
testRuntime "org.junit.jupiter:junit-jupiter-engine:5.3.0"
4444

45-
// Forcing logback to be used for test logging
46-
testRuntime "ch.qos.logback:logback-classic:1.1.8"
47-
testRuntime group: "org.slf4j", name: "jcl-over-slf4j", version: "1.7.22"
48-
testRuntime group: "org.slf4j", name: "slf4j-api", version: "1.7.22"
45+
// Forcing logback to be used for test logging
46+
testRuntime "ch.qos.logback:logback-classic:1.1.8"
47+
testRuntime group: "org.slf4j", name: "jcl-over-slf4j", version: "1.7.22"
48+
testRuntime group: "org.slf4j", name: "slf4j-api", version: "1.7.22"
4949

50-
documentation files('LICENSE.txt')
51-
documentation files('NOTICE.txt')
52-
documentation files('README.md')
50+
documentation files('LICENSE.txt')
51+
documentation files('NOTICE.txt')
52+
documentation files('README.md')
5353

54-
assets files('MarkLogic_logo.png')
55-
assets files('apache_logo.png')
54+
assets files('MarkLogic_logo.png')
55+
assets files('apache_logo.png')
5656
}
5757

5858
// Needed by Gradle 4.6+ - see https://www.petrikainulainen.net/programming/testing/junit-5-tutorial-running-unit-tests-with-gradle/
5959
test {
60-
useJUnitPlatform()
60+
useJUnitPlatform()
6161
}
6262

6363
// Customize the Java plugin's jar task to produce a "fat" jar with all dependencies included
6464
jar {
65-
manifest {
66-
attributes 'Implementation-Title': 'Kafka-Connect-MarkLogic',
67-
'Implementation-Version': version
68-
}
69-
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
65+
manifest {
66+
attributes 'Implementation-Title': 'Kafka-Connect-MarkLogic',
67+
'Implementation-Version': version
68+
}
69+
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
7070
}
7171

7272
task copyJarToKafka(type: Copy) {
73-
description = "Used for local development and testing; copies the jar to your local Kafka install"
74-
from "build/libs"
75-
into "${kafkaHome}/libs"
73+
description = "Used for local development and testing; copies the jar to your local Kafka install"
74+
from "build/libs"
75+
into "${kafkaHome}/libs"
7676
}
7777
copyJarToKafka.mustRunAfter(jar)
7878

7979
task copyPropertyFilesToKafka(type: Copy) {
80-
description = "Used for local development and testing; copies the properties files to your local Kafka install"
81-
from "config"
82-
into "${kafkaHome}/config"
80+
description = "Used for local development and testing; copies the properties files to your local Kafka install"
81+
from "config"
82+
into "${kafkaHome}/config"
8383
}
8484

8585
task deploy {
86-
description = "Used for local development and testing; builds the jar and copies it and the properties files to your local Kafka install"
87-
dependsOn = ["jar", "copyJarToKafka", "copyPropertyFilesToKafka"]
86+
description = "Used for local development and testing; builds the jar and copies it and the properties files to your local Kafka install"
87+
dependsOn = ["jar", "copyJarToKafka", "copyPropertyFilesToKafka"]
8888
}
8989

9090
// Tasks for building the archive required for submitting to the Confluence Connector Hub
91-
import org.apache.tools.ant.filters.*
91+
92+
import org.apache.tools.ant.filters.ReplaceTokens
93+
9294
def baseArchiveBuildDir = "build/connectorArchive"
9395
def baseArchiveName = "${componentOwner}-${componentName}-${version}"
9496
task connectorArchive_CopyManifestToBuildDirectory(type: Copy) {
95-
description = "Copy the project manifest into the root folder"
96-
group = 'connector archive'
97+
description = "Copy the project manifest into the root folder"
98+
group = 'connector archive'
9799

98-
from '.'
99-
include 'manifest.json'
100-
into "${baseArchiveBuildDir}/${baseArchiveName}"
101-
filter(ReplaceTokens, tokens:[CONFLUENT_USER:componentOwner, VERSION:version])
100+
from '.'
101+
include 'manifest.json'
102+
into "${baseArchiveBuildDir}/${baseArchiveName}"
103+
filter(ReplaceTokens, tokens: [CONFLUENT_USER: componentOwner, VERSION: version])
102104
}
103105

104106
task connectorArchive_CopyAssetsToBuildDirectory(type: Copy) {
105-
description = "Copy the project assets into the assets folder"
106-
group = 'connector archive'
107+
description = "Copy the project assets into the assets folder"
108+
group = 'connector archive'
107109

108-
from configurations.assets
109-
into "${baseArchiveBuildDir}/${baseArchiveName}/assets"
110+
from configurations.assets
111+
into "${baseArchiveBuildDir}/${baseArchiveName}/assets"
110112
}
111113

112114
task connectorArchive_CopyEtcToBuildDirectory(type: Copy) {
113-
description = "Copy the project support files into the etc folder"
114-
group = 'connector archive'
115+
description = "Copy the project support files into the etc folder"
116+
group = 'connector archive'
115117

116-
from 'config'
117-
include '*'
118-
into "${baseArchiveBuildDir}/${baseArchiveName}/etc"
118+
from 'config'
119+
include '*'
120+
into "${baseArchiveBuildDir}/${baseArchiveName}/etc"
119121
}
120122

121123
task connectorArchive_CopyDocumentationToBuildDirectory(type: Copy) {
122-
description = "Copy the project documentation into the doc folder"
123-
group = 'connector archive'
124+
description = "Copy the project documentation into the doc folder"
125+
group = 'connector archive'
124126

125-
from configurations.documentation
126-
into "${baseArchiveBuildDir}/${baseArchiveName}/doc"
127+
from configurations.documentation
128+
into "${baseArchiveBuildDir}/${baseArchiveName}/doc"
127129
}
128130

129131
task connectorArchive_CopyDependenciesToBuildDirectory(type: Copy) {
130-
description = "Copy the dependency jars into the lib folder"
131-
group = 'connector archive'
132-
dependsOn = [jar]
132+
description = "Copy the dependency jars into the lib folder"
133+
group = 'connector archive'
134+
dependsOn = [jar]
133135

134-
from jar
135-
from configurations.compile
136-
into "${baseArchiveBuildDir}/${baseArchiveName}/lib"
136+
from jar
137+
from configurations.compile
138+
into "${baseArchiveBuildDir}/${baseArchiveName}/lib"
137139
}
138140

139141
task connectorArchive_BuildDirectory() {
140-
description = "Build the directory that will be used to create the Kafka Connector Archive"
141-
dependsOn = [connectorArchive_CopyManifestToBuildDirectory,
142-
connectorArchive_CopyDependenciesToBuildDirectory,
143-
connectorArchive_CopyDocumentationToBuildDirectory,
144-
connectorArchive_CopyEtcToBuildDirectory,
145-
connectorArchive_CopyAssetsToBuildDirectory]
146-
group = 'connector archive'
142+
description = "Build the directory that will be used to create the Kafka Connector Archive"
143+
dependsOn = [connectorArchive_CopyManifestToBuildDirectory,
144+
connectorArchive_CopyDependenciesToBuildDirectory,
145+
connectorArchive_CopyDocumentationToBuildDirectory,
146+
connectorArchive_CopyEtcToBuildDirectory,
147+
connectorArchive_CopyAssetsToBuildDirectory]
148+
group = 'connector archive'
147149
}
148150

149151
task connectorArchive(type: Zip, dependsOn: connectorArchive_BuildDirectory) {
150-
description = 'Build a Connector Hub for the Confluent Connector Hub'
151-
group = 'connector archive'
152+
description = 'Build a Connector Hub for the Confluent Connector Hub'
153+
group = 'connector archive'
152154

153-
from "${baseArchiveBuildDir}"
154-
include '**/*'
155-
archiveName "${baseArchiveName}.zip"
156-
destinationDir(file('build/distro'))
155+
from "${baseArchiveBuildDir}"
156+
include '**/*'
157+
archiveName "${baseArchiveName}.zip"
158+
destinationDir(file('build/distro'))
157159
}

0 commit comments

Comments
 (0)