Skip to content

Commit

Permalink
redid project layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed May 3, 2021
1 parent b64eb89 commit d8cec7c
Show file tree
Hide file tree
Showing 174 changed files with 199 additions and 161 deletions.
89 changes: 18 additions & 71 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,80 +1,24 @@
plugins {
id 'net.researchgate.release' version '2.8.1'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'org.asciidoctor.jvm.convert'
id 'org.ajoberstar.git-publish' version '3.0.0'
id 'com.github.ben-manes.versions' version '0.38.0'
id 'org.springframework.boot' version '2.4.5'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id "io.freefair.lombok" version "6.0.0-m2"
id 'com.github.breadmoirai.github-release' version '2.2.12'
id 'org.jreleaser' version '0.2.0'
}

repositories {
mavenCentral()
}

subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'io.freefair.lombok'
apply plugin: 'org.asciidoctor.jvm.convert'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
repositories {
mavenCentral()
mavenLocal()
}
tasks.withType(Tar) {
compression = Compression.GZIP
}
bootJar {
enabled = false
classifier = 'boot'
}
jar {
enabled = true
}
dependencies {
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
testImplementation 'org.springframework.batch:spring-batch-test'
testImplementation 'org.hsqldb:hsqldb'
}
configurations {
all*.exclude module: 'spring-boot-starter-logging'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'io.lettuce') {
details.useVersion '6.1.1.RELEASE'
}
}
}
test {
useJUnitPlatform()
}
}

release {
tagTemplate = 'v${version}'
buildTasks = ['releaseBuild']
}

task releaseBuild {
dependsOn subprojects.findResults { it.tasks.findByName('build') }
}

asciidoctor {
sourceDir 'docs'
resources {
from ('src/resources/images') {
from ('docs/images') {
include 'riot.svg'
include 'architecture.png'
include 'mapping.png'
include 'favicon.svg'
}
from("connectors/file/src/test/resources/files") {
from("riot-file/src/test/resources/files") {
include '*.*'
}
}
Expand Down Expand Up @@ -102,15 +46,18 @@ tasks.named("dependencyUpdates").configure {
}
}

githubRelease {
token = project.hasProperty('githubToken') ? project.property('githubToken') : ''
owner "redis-developer"
repo "riot"
releaseAssets "connectors/db/build/distributions/riot-db-${project.version}.zip", "connectors/file/build/distributions/riot-file-${project.version}.zip", "connectors/gen/build/distributions/riot-gen-${project.version}.zip", "connectors/redis/build/distributions/riot-redis-${project.version}.zip", "connectors/stream/build/distributions/riot-stream-${project.version}.zip"
body changelog()
draft true
jreleaser {
release {
github {
owner = 'redis-developer'
overwrite = true
}
}
packagers {
brew {
active = 'RELEASE'
}
}
}

gitPublishPush.dependsOn asciidoctor
afterReleaseBuild.dependsOn gitPublishPush
afterReleaseBuild.dependsOn ":githubRelease"
gitPublishPush.dependsOn asciidoctor
14 changes: 14 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id 'groovy-gradle-plugin'
}

repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-gradle-plugin:2.4.5'
implementation 'io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE'
implementation 'org.asciidoctor:asciidoctor-gradle-jvm:3.3.2'
}
12 changes: 12 additions & 0 deletions buildSrc/src/main/groovy/riot.connector-conventions.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
plugins {
id 'org.asciidoctor.jvm.convert'
id 'application'
}

repositories {
mavenCentral()
}

tasks.withType(Tar) {
compression = Compression.GZIP
}
44 changes: 44 additions & 0 deletions buildSrc/src/main/groovy/riot.library-conventions.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
id 'java-library'
id 'org.springframework.boot'
id 'io.spring.dependency-management'
}

repositories {
mavenCentral()
}

sourceCompatibility = '1.8'
targetCompatibility = '1.8'

bootJar {
enabled = false
classifier = 'boot'
}
jar {
enabled = true
}

dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
testImplementation 'org.springframework.batch:spring-batch-test'
testImplementation 'org.hsqldb:hsqldb'
}
configurations {
all*.exclude module: 'spring-boot-starter-logging'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'io.lettuce') {
details.useVersion '6.1.1.RELEASE'
}
}
}
test {
useJUnitPlatform()
}
5 changes: 0 additions & 5 deletions connectors/db/riot-db

This file was deleted.

5 changes: 0 additions & 5 deletions connectors/file/riot-file

This file was deleted.

Empty file.
5 changes: 0 additions & 5 deletions connectors/gen/riot-gen

This file was deleted.

5 changes: 0 additions & 5 deletions connectors/redis/riot-redis

This file was deleted.

This file was deleted.

4 changes: 4 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'riot.library-conventions'
}

dependencies {
api 'com.redislabs:mesclun:1.2.6'
api 'com.redislabs:spring-batch-redis:2.12.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ brew install jruaux/tap/{app}
[subs="attributes",source,bash]
----
git clone https://github.com/redis-developer/riot.git
cd riot/connectors/{connector}
cd {app}
./{app}
----

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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=2.10.0
version=2.11.0-SNAPSHOT
picocli_version=4.6.1
9 changes: 6 additions & 3 deletions connectors/db/build.gradle β†’ riot-db/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apply plugin: 'application'
plugins {
id 'riot.library-conventions'
id 'riot.connector-conventions'
}

archivesBaseName = 'riot-db'

Expand All @@ -13,7 +16,7 @@ dependencies {
implementation 'mysql:mysql-connector-java'
implementation 'org.postgresql:postgresql'
implementation 'org.xerial:sqlite-jdbc:3.34.0'
testImplementation project(':connectors:test')
testImplementation project(':test')
testImplementation 'org.testcontainers:postgresql:1.15.3'
testImplementation 'org.testcontainers:oracle-xe:1.15.3'
}
Expand All @@ -24,5 +27,5 @@ application {
}

asciidoctor {
outputDir "../../build/docs/asciidoc/db/"
outputDir "../build/docs/asciidoc/db/"
}
5 changes: 5 additions & 0 deletions riot-db/riot-db
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -e

../gradlew -q --console plain :db:installDist

./build/install/riot-db/bin/riot-db "$@"
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
= {app-name}
:app-name: RIOT DB
:connector: db
:app: riot-db
include::../../src/docs/asciidoc/preamble.adoc[]
include::../docs/preamble.adoc[]

{app-name} lets you import and export data from relational databases.

include::../../src/docs/asciidoc/getting_started.adoc[]
include::../docs/getting_started.adoc[]

== Drivers

Expand Down Expand Up @@ -59,9 +58,9 @@ Use the `import` command to import the result set of a SQL statement:
include::src/test/resources/import-postgresql[]
----

include::../../src/docs/asciidoc/redis-commands.adoc[]
include::../docs/redis-commands.adoc[]

include::../../src/docs/asciidoc/processing.adoc[]
include::../docs/processing.adoc[]

== Exporting

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 6 additions & 3 deletions connectors/file/build.gradle β†’ riot-file/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apply plugin: 'application'
plugins {
id 'riot.library-conventions'
id 'riot.connector-conventions'
}

archivesBaseName = 'riot-file'

Expand All @@ -10,7 +13,7 @@ dependencies {
implementation 'org.springframework.cloud:spring-cloud-aws-context:2.2.6.RELEASE'
implementation 'org.springframework.cloud:spring-cloud-aws-autoconfigure:2.2.6.RELEASE'
implementation 'org.springframework.cloud:spring-cloud-gcp-starter-storage:1.2.8.RELEASE'
testImplementation project(':connectors:test')
testImplementation project(':test')
}

application {
Expand All @@ -19,5 +22,5 @@ application {
}

asciidoctor {
outputDir "../../build/docs/asciidoc/file/"
outputDir "../build/docs/asciidoc/file/"
}
5 changes: 5 additions & 0 deletions riot-file/riot-file
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -e

../gradlew -q --console plain :riot-file:installDist

./build/install/riot-file/bin/riot-file "$@"
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
= {app-name}
:app-name: RIOT File
:connector: file
:app: riot-file
include::../../src/docs/asciidoc/preamble.adoc[]
include::../docs/preamble.adoc[]

{app-name} lets you import and export local or remote files in many formats like CSV, JSON, and XML.

include::../../src/docs/asciidoc/getting_started.adoc[]
include::../docs/getting_started.adoc[]

== Importing

Expand Down Expand Up @@ -178,9 +177,9 @@ include::src/test/resources/import-xml[]
include::src/test/resources/import-dump
----

include::../../src/docs/asciidoc/redis-commands.adoc[]
include::../docs/redis-commands.adoc[]

include::../../src/docs/asciidoc/processing.adoc[]
include::../docs/processing.adoc[]

== Exporting

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.util.stream.Collectors;
import java.util.zip.GZIPInputStream;

@SuppressWarnings("unchecked")
public class TestFile extends RiotIntegrationTest {

protected final static int COUNT = 2410;
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.
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.
Loading

0 comments on commit d8cec7c

Please sign in to comment.