Skip to content

Commit c366a01

Browse files
author
Pavel Derendyaev
committed
Move consumers to core module
1 parent 8d5b50a commit c366a01

File tree

6 files changed

+33
-22
lines changed

6 files changed

+33
-22
lines changed

build.gradle

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,42 @@ buildscript {
1313
}
1414
}
1515

16-
apply plugin: 'java'
1716
apply plugin: 'application'
1817
apply plugin: 'com.bmuschko.docker-remote-api'
1918
apply plugin: 'com.github.johnrengelman.shadow'
2019

21-
group = 'com.github.dddpaul.kafka'
22-
version = '0.0.1-SNAPSHOT'
23-
mainClassName = 'com.github.dddpaul.kafka.rewind.Application'
24-
sourceCompatibility = 1.9
2520

26-
ext {
27-
dockerPrefix = "dddpaul"
28-
}
21+
allprojects {
22+
group = 'com.github.dddpaul.kafka'
23+
version = '0.0.1-SNAPSHOT'
24+
mainClassName = 'com.github.dddpaul.kafka.rewind.Application'
25+
sourceCompatibility = 1.9
26+
27+
apply plugin: 'java'
28+
29+
ext {
30+
dockerPrefix = "dddpaul"
31+
}
32+
33+
repositories {
34+
jcenter()
35+
mavenCentral()
36+
}
2937

30-
repositories {
31-
jcenter()
32-
mavenCentral()
38+
task wrapper(type: Wrapper) {
39+
gradleVersion = '4.2.1'
40+
distributionUrl = 'https://services.gradle.org/distributions/gradle-4.2.1-all.zip'
41+
}
3342
}
3443

3544
dependencies {
36-
compile 'info.picocli:picocli:2.2.0'
37-
compile 'io.vavr:vavr:0.9.2'
38-
compile 'org.slf4j:slf4j-simple:1.7.25'
39-
compile 'org.apache.kafka:kafka-clients:0.11.0.2'
45+
compile project(':core')
4046
testCompile 'com.github.charithe:kafka-junit:4.1.0'
4147
testCompile 'org.assertj:assertj-core:3.8.0'
4248
testCompile 'org.apiguardian:apiguardian-api:1.0.0'
4349
testCompile 'org.apache.commons:commons-configuration2:2.2'
4450
}
4551

46-
task wrapper(type: Wrapper) {
47-
gradleVersion = '4.1'
48-
distributionUrl = 'https://services.gradle.org/distributions/gradle-4.2.1-all.zip'
49-
}
50-
5152
task createDockerfile(type: Dockerfile) {
5253
dependsOn shadowJar
5354
destFile = project.file("${project.buildDir}/Dockerfile")

core/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies {
2+
compile 'info.picocli:picocli:2.2.0'
3+
compile 'io.vavr:vavr:0.9.2'
4+
compile 'org.slf4j:slf4j-simple:1.7.25'
5+
compile 'org.apache.kafka:kafka-clients:0.11.0.2'
6+
}

src/main/java/com/github/dddpaul/kafka/rewind/Seeker.java renamed to core/src/main/java/com/github/dddpaul/kafka/rewind/consumers/Seeker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.dddpaul.kafka.rewind;
1+
package com.github.dddpaul.kafka.rewind.consumers;
22

33
import org.apache.kafka.clients.consumer.KafkaConsumer;
44
import org.apache.kafka.clients.consumer.OffsetAndTimestamp;

src/main/java/com/github/dddpaul/kafka/rewind/SimpleConsumer.java renamed to core/src/main/java/com/github/dddpaul/kafka/rewind/consumers/SimpleConsumer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.dddpaul.kafka.rewind;
1+
package com.github.dddpaul.kafka.rewind.consumers;
22

33
import org.apache.kafka.clients.consumer.ConsumerRecords;
44
import org.apache.kafka.clients.consumer.KafkaConsumer;

settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include 'core'
2+

src/main/java/com/github/dddpaul/kafka/rewind/Application.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.github.dddpaul.kafka.rewind;
22

3+
import com.github.dddpaul.kafka.rewind.consumers.Seeker;
4+
import com.github.dddpaul.kafka.rewind.consumers.SimpleConsumer;
35
import io.vavr.control.Try;
46
import org.apache.kafka.clients.consumer.KafkaConsumer;
57
import org.slf4j.Logger;

0 commit comments

Comments
 (0)