Skip to content

Commit

Permalink
chore: bump gradle configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jeqo committed Mar 8, 2024
1 parent 44f6048 commit a37919c
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 46 deletions.
89 changes: 48 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
* limitations under the License.
*/

import org.gradle.util.DistributionLocator
import org.gradle.util.GradleVersion

plugins {

// https://docs.gradle.org/current/userguide/java_library_plugin.html
Expand All @@ -40,25 +37,33 @@ repositories {
mavenCentral()
}

group = "io.aiven"

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

withJavadocJar()
withSourcesJar()
}

wrapper {
distributionType = 'ALL'
doLast {
final DistributionLocator locator = new DistributionLocator()
final GradleVersion version = GradleVersion.version(wrapper.gradleVersion)
final URI distributionUri = locator.getDistributionFor(version, wrapper.distributionType.name().toLowerCase(Locale.ENGLISH))
final URI sha256Uri = new URI(distributionUri.toString() + ".sha256")
final String sha256Sum = new String(sha256Uri.toURL().bytes)
wrapper.getPropertiesFile() << "distributionSha256Sum=${sha256Sum}\n"
def sha256Sum = new String(new URL("${distributionUrl}.sha256").bytes)
propertiesFile << "distributionSha256Sum=${sha256Sum}\n"
println "Added checksum to wrapper properties"
}
}

ext {
kafkaVersion = "2.2.0"
slf4jVersion = "1.7.36"
elasticSearchVersion = "2.4.1"
luceneVersion = "5.5.2"
jestVersion = "6.3.1"
}

compileJava {
options.compilerArgs = ['-Xlint:all', '-Werror']
}
Expand All @@ -72,6 +77,32 @@ jacoco {
toolVersion = "0.8.7"
}

dependencies {
compileOnly "org.apache.kafka:connect-api:$kafkaVersion"
compileOnly "org.apache.kafka:connect-json:$kafkaVersion"

implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation "io.searchbox:jest:$jestVersion"

testImplementation("junit:junit:4.13.2") {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
testImplementation "org.hamcrest:hamcrest-all:1.3"
testImplementation "org.mockito:mockito-core:5.4.0"
testImplementation "org.mockito:mockito-all:1.10.19"

testImplementation "org.apache.kafka:connect-api:$kafkaVersion"
testImplementation "org.apache.kafka:connect-json:$kafkaVersion"
testImplementation "org.apache.lucene:lucene-test-framework:$luceneVersion"
testImplementation "com.fasterxml.jackson.core:jackson-core:2.15.2"
testImplementation "com.fasterxml.jackson.core:jackson-databind:2.15.2"
testImplementation "com.fasterxml.jackson.core:jackson-annotations:2.15.2"
testImplementation "org.elasticsearch:elasticsearch:$elasticSearchVersion:tests"
testImplementation "org.elasticsearch:elasticsearch:$elasticSearchVersion"
testImplementation "org.apache.lucene:lucene-expressions:$luceneVersion"
testRuntimeOnly "org.slf4j:slf4j-log4j12:$slf4jVersion"
}

distributions {
main {
contents {
Expand Down Expand Up @@ -122,47 +153,23 @@ publishing {
}
}

ext {
kafkaVersion = "2.2.0"
slf4jVersion = "1.7.36"
elasticSearchVersion = "2.4.1"
luceneVersion = "5.5.2"
jestVersion = "6.3.1"
}

processResources {
filesMatching('elasticsearch-connector-for-apache-kafka-version.properties') {
expand(version: version)
}
}

dependencies {
compileOnly "org.apache.kafka:connect-api:$kafkaVersion"
compileOnly "org.apache.kafka:connect-json:$kafkaVersion"

implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation "io.searchbox:jest:$jestVersion"

testImplementation("junit:junit:4.13.2") {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
jar {
manifest {
attributes(
'Version': "${project.version}"
)
}
testImplementation "org.hamcrest:hamcrest-all:1.3"
testImplementation "org.mockito:mockito-core:5.4.0"
testImplementation "org.mockito:mockito-all:1.10.19"

testImplementation "org.apache.kafka:connect-api:$kafkaVersion"
testImplementation "org.apache.kafka:connect-json:$kafkaVersion"
testImplementation "org.apache.lucene:lucene-test-framework:$luceneVersion"
testImplementation "com.fasterxml.jackson.core:jackson-core:2.15.2"
testImplementation "com.fasterxml.jackson.core:jackson-databind:2.15.2"
testImplementation "com.fasterxml.jackson.core:jackson-annotations:2.15.2"
testImplementation "org.elasticsearch:elasticsearch:$elasticSearchVersion:tests"
testImplementation "org.elasticsearch:elasticsearch:$elasticSearchVersion"
testImplementation "org.apache.lucene:lucene-expressions:$luceneVersion"
testRuntimeOnly "org.slf4j:slf4j-log4j12:$slf4jVersion"
}


test {
useJUnitPlatform()

//we do not need to check classpath hell for testing
systemProperty "tests.jarhell.check", "false"
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
group=io.aiven
version=6.2.0-SNAPSHOT
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionSha256Sum=f2b9ed0faf8472cbe469255ae6c86eddb77076c75191741b4a462f33128dd419
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=cd5c2958a107ee7f0722004a12d0f8559b4564c34daad7df06cffd4d12a426d0
2 changes: 0 additions & 2 deletions version.txt

This file was deleted.

0 comments on commit a37919c

Please sign in to comment.