Skip to content

Commit

Permalink
changed project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Jun 15, 2021
1 parent d4d1903 commit 6f3a455
Show file tree
Hide file tree
Showing 249 changed files with 299 additions and 402 deletions.
152 changes: 92 additions & 60 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,92 +1,129 @@
plugins {
id 'jacoco'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id 'org.jreleaser' version '0.4.0'
id 'com.github.ben-manes.versions' version '0.39.0'
id 'org.asciidoctor.jvm.convert'
id 'org.ajoberstar.git-publish' version '3.0.0'
}
config {
info {
description = 'Redis Input/Output Tools'
inceptionYear = '2020'
vendor = 'Redis Labs'
tags = ['redis', 'data', 'import', 'export', 'generator', 'file', 'sql', 'replication']
links {
website = 'https://github.com/redis-developer/${project.rootProject.name}'
issueTracker = 'https://github.com/redis-developer/${project.rootProject.name}/issues'
scm = 'https://github.com/redis-developer/${project.rootProject.name}.git'
}

scm {
url = "https://github.com/redis-developer/${project.rootProject.name}"
connection = "scm:git:https://github.com/redis-developer/${project.rootProject.name}.git"
developerConnection = "scm:git:[email protected]:redis-developer/${project.rootProject.name}.git"
}

repositories {
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/redis-developer/registry")
credentials {
username = project.findProperty("github.username") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("github.token") ?: System.getenv("GITHUB_TOKEN")
specification {
enabled = true
}

implementation {
enabled = true
}

people {
person {
id = 'jruaux'
name = 'Julien Ruaux'
roles = ['developer', 'author']
}
}
}
}

asciidoctor {
sourceDir 'docs'
resources {
from ('docs/images') {
include 'riot.svg'
include 'architecture.png'
include 'mapping.png'
include 'favicon.svg'
licensing {
enabled = false
licenses {
license {
id = 'Apache-2.0'
}
}
from("riot-file/src/test/resources/files") {
include '*.*'
}

docs {
javadoc {
autoLinks {
enabled = false
}
}
}
}

gitPublish {
repoUri = 'https://github.com/redis-developer/riot.git'
referenceRepoUri = 'file:///Users/jruaux/git/riot/'
branch = 'gh-pages'
contents {
from 'build/docs/asciidoc'
allprojects {
repositories {
gradlePluginPortal()
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/redis-developer/registry")
credentials {
username = project.findProperty("github.username") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("github.token") ?: System.getenv("GITHUB_TOKEN")
}
}
}

tasks.withType(GenerateModuleMetadata) {
enabled = false
}
}

sourceCompatibility = '1.8'
targetCompatibility = '1.8'
subprojects {
config {
info {
description = project.project_description
}
}

def isNonStable = { String version ->
def nonStableKeyword = ['PREVIEW'].any { it -> version.toUpperCase().contains(it) }
def stableKeyword = ['RELEASE', 'FINAL', 'GA', 'JRE8'].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+([.-]r)?$/
return nonStableKeyword || (!stableKeyword && !(version ==~ regex))
}
dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
}

configurations {
all*.exclude module: 'spring-boot-starter-logging'
}

tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version) && !isNonStable(it.currentVersion)
test {
useJUnitPlatform()
}

bootJar {
enabled = false
}

jar {
enabled = true
archiveClassifier = ''
}
}


jreleaser {
project {
name = 'riot'
description = 'Redis Input/Output Tools'
longDescription = 'Get data in and out of Redis with RIOT'
website = 'https://developer.redislabs.com/riot'
authors = ['Julien Ruaux']
tags = ['redis']
license = 'Apache-2.0'
copyright = '2021 Julien Ruaux'
java {
multiProject = true
}
}
release {
github {
username = 'jruaux'
owner = 'redis-developer'
overwrite = true
}
}
//noinspection GroovyAssignabilityCheck
distributions {
['db', 'file', 'gen', 'redis', 'stream'].each { n ->
"riot-$n" {
['riot-db', 'riot-file', 'riot-gen', 'riot-redis', 'riot-stream'].each { n ->
"$n" {
brew {
active = 'release'
formulaName = "riot-${n}"
formulaName = "${n}"
}
scoop {
active = 'release'
Expand All @@ -96,12 +133,9 @@ jreleaser {
}
artifacts {
artifact {
path = "{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip"
path = "connectors/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip"
}
}
java {
artifactId = "riot-${n}"
}
}
}
}
Expand All @@ -112,5 +146,3 @@ nexusPublishing {
sonatype()
}
}

gitPublishPush.dependsOn asciidoctor
17 changes: 0 additions & 17 deletions buildSrc/build.gradle

This file was deleted.

25 changes: 0 additions & 25 deletions buildSrc/src/main/groovy/riot.connector-conventions.gradle

This file was deleted.

60 changes: 0 additions & 60 deletions buildSrc/src/main/groovy/riot.java-conventions.gradle

This file was deleted.

71 changes: 0 additions & 71 deletions buildSrc/src/main/groovy/riot.publish-conventions.gradle

This file was deleted.

1 change: 1 addition & 0 deletions connectors/riot-db/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
project_description = 'RIOT DB'
File renamed without changes.
Loading

0 comments on commit 6f3a455

Please sign in to comment.