Skip to content

Commit

Permalink
Checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
gfinocchiaro committed Feb 23, 2024
1 parent bb2337b commit d0dc1d0
Show file tree
Hide file tree
Showing 111 changed files with 156 additions and 75 deletions.
11 changes: 11 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
plugins {
id 'groovy-gradle-plugin'
}

repositories {
gradlePluginPortal()
}

dependencies {
implementation "com.diffplug.spotless:spotless-plugin-gradle:6.25.0"
}
74 changes: 5 additions & 69 deletions build.gradle → ...oovy/lightstreamer-kafka-connector.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
plugins {
id 'java-library'
id 'eclipse'
id 'distribution'
id "com.github.davidmc24.gradle.plugin.avro" version "1.9.1"
id("com.diffplug.spotless") version "6.25.0"
id 'java-library-distribution'
id("com.diffplug.spotless")
}

group = 'com.lightstreamer.kafka_connector'

spotless {
format 'misc', {
target '*.gradle'
Expand Down Expand Up @@ -47,8 +47,6 @@ spotless {
}
}

version = '0.1.0'

repositories {
mavenCentral()
maven {
Expand All @@ -61,14 +59,6 @@ dependencies {
testImplementation('org.junit.jupiter:junit-jupiter')
testImplementation "com.google.truth:truth:1.2.0"
testImplementation "com.google.truth.extensions:truth-java8-extension:1.2.0"

implementation group: 'com.lightstreamer', name: 'ls-adapter-inprocess', version: '8.0.0'
implementation group: 'org.slf4j', name: 'slf4j-reload4j', 'version': '2.0.10'

implementation group:'org.apache.kafka', name:'kafka-clients', version:'7.5.3-ccs'
implementation group:'io.confluent', name: 'kafka-avro-serializer', version:'7.5.3'
implementation group:'io.confluent', name: 'kafka-json-serializer', version:'7.5.3'
implementation group:'io.confluent', name: 'kafka-json-schema-serializer', version:'7.5.3'
}

java {
Expand All @@ -79,58 +69,4 @@ java {

tasks.named('test') {
useJUnitPlatform()
}

task deployAdapters(type: Copy) {
dependsOn 'cleanDeploy'

into "deploy"

from (jar) {
into "connector/lib"
}

from (configurations.runtimeClasspath) {
into "connector/lib"
exclude "ls-adapter-inprocess*"
exclude "jsr305*"
}

from ("examples/quickstart") {
into "connector"
}
}

task deploy(type: Copy) {
dependsOn 'deployAdapters'
into "deploy/conf"
from ("examples/conf")
}

task cleanDeploy(type: Delete) {
delete "deploy"
}

sourceSets.main.java.srcDirs += ['src/clients/java']

distributions {
connector {
distributionBaseName = rootProject.name

contents {
from(jar) {
into "lib"
}

from (configurations.runtimeClasspath) {
into "lib"
exclude "ls-adapter-inprocess*"
exclude "jsr305*"
}
}
}
}

task distribuite {
dependsOn connectorDistZip
}
}
32 changes: 32 additions & 0 deletions connector/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin/test" path="src/test/resources">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/java">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
34 changes: 34 additions & 0 deletions connector/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>connector</name>
<comment>Project connector created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<filteredResources>
<filter>
<id>1708629776379</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
67 changes: 67 additions & 0 deletions connector/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
plugins {
id 'lightstreamer-kafka-connector'
id "com.github.davidmc24.gradle.plugin.avro" version "1.9.1"
}

dependencies {
implementation group: 'com.lightstreamer', name: 'ls-adapter-inprocess', version: '8.0.0'
implementation group: 'org.slf4j', name: 'slf4j-reload4j', 'version': '2.0.10'
implementation group: 'org.apache.kafka', name:'kafka-clients', version:'7.5.3-ccs'
implementation group: 'io.confluent', name: 'kafka-avro-serializer', version:'7.5.3'
implementation group: 'io.confluent', name: 'kafka-json-serializer', version:'7.5.3'
implementation group: 'io.confluent', name: 'kafka-json-schema-serializer', version:'7.5.3'
}

task deployAdapters(type: Copy) {
dependsOn 'cleanDeploy'

into "deploy"

from (jar) {
into "connector/lib"
}

from (configurations.runtimeClasspath) {
into "connector/lib"
exclude "ls-adapter-inprocess*"
exclude "jsr305*"
}

from ("examples/quickstart") {
into "connector"
}
}

task deploy(type: Copy) {
dependsOn 'deployAdapters'
into "deploy/conf"
from ("examples/conf")
}

task cleanDeploy(type: Delete) {
delete "deploy"
}

sourceSets.main.java.srcDirs += ['src/clients/java']

distributions {
connector {
distributionBaseName = rootProject.name

contents {
from(jar) {
into "lib"
}

from (configurations.runtimeClasspath) {
into "lib"
exclude "ls-adapter-inprocess*"
exclude "jsr305*"
}
}
}
}

task distribuite {
dependsOn connectorDistZip
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

<param name="group.id">test</param>

<param name="enable">true</param>
<param name="enable">disable</param>

<!-- TOPIC MAPPING SECTION -->

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ public void onUnsubscription(String user, String sessionID, TableInfo[] tables)
throws CreditsException, NotificationException {}

@Override
public void onUnsubscription(String sessionID, TableInfo[] tables) throws NotificationException {}
public void onUnsubscription(String sessionID, TableInfo[] tables)
throws NotificationException {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.lightstreamer.interfaces.metadata.Mode;
import com.lightstreamer.interfaces.metadata.NotificationException;
import com.lightstreamer.interfaces.metadata.TableInfo;
import com.lightstreamer.kafka_connector.adapters.ConnectorMetadataAdapter;
import com.lightstreamer.kafka_connector.adapters.commons.MetadataListener;
import com.lightstreamer.kafka_connector.adapters.config.ConfigException;
import com.lightstreamer.kafka_connector.adapters.config.GlobalConfig;
Expand Down Expand Up @@ -65,8 +64,7 @@ public final void init(@SuppressWarnings("rawtypes") Map params, File configDir)
doInit(params, configDir);
}

protected void doInit(Map params, File configDir) throws MetadataProviderException {
}
protected void doInit(Map params, File configDir) throws MetadataProviderException {}

// Used only for unit testing.
public final Optional<Set<String>> itemsBySession(String sessionId) {
Expand All @@ -76,7 +74,7 @@ public final Optional<Set<String>> itemsBySession(String sessionId) {
private void configureLogging(File configDir) throws ConfigException {
String logConfigFile = globalConfig.getFile(GlobalConfig.LOGGING_CONFIGURATION_PATH);
PropertyConfigurator.configure(logConfigFile);
this.log = LoggerFactory.getLogger(ConnectorMetadataAdapter.class);
this.log = LoggerFactory.getLogger(KafkaConnectorMetadataAdapter.class);
}

public static final MetadataListener listener(String dataProviderName, boolean enabled) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = 0.1.0
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
rootProject.name = 'lightstreamer-kafka-connector'
include 'connector'

0 comments on commit d0dc1d0

Please sign in to comment.