Skip to content

Commit e5fcc0e

Browse files
committed
Prototype.
1 parent 4118801 commit e5fcc0e

40 files changed

+1609
-354
lines changed

.gitattributes

-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
#
2-
# https://help.github.com/articles/dealing-with-line-endings/
3-
#
4-
# These are explicitly windows files and should use crlf
51
*.bat text eol=crlf
6-

.gitignore

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
# Ignore Gradle project-specific cache directory
1+
# Gradle
22
.gradle
3-
4-
# Ignore Gradle build output directory
53
build
4+
5+
# IntelliJ IDEA
6+
.idea
7+
*.iml
8+
9+
# macOS
10+
.DS_Store

app/build.gradle.kts

-16
This file was deleted.

app/src/main/java/com/zhokhov/dumper/app/App.java

-18
This file was deleted.

app/src/main/java/com/zhokhov/dumper/app/MessageUtils.java

-10
This file was deleted.

app/src/test/java/com/zhokhov/dumper/app/MessageUtilsTest.java

-14
This file was deleted.

build.gradle.kts

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
import com.jfrog.bintray.gradle.BintrayExtension
2+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3+
4+
buildscript {
5+
repositories {
6+
mavenLocal()
7+
gradlePluginPortal()
8+
jcenter()
9+
mavenCentral()
10+
}
11+
}
12+
13+
plugins {
14+
java
15+
idea
16+
`maven-publish`
17+
id("com.adarshr.test-logger") version Versions.gradleTestLoggerPlugin apply false
18+
id("net.rdrei.android.buildtimetracker") version Versions.gradleBuildTimeTrackerPlugin
19+
id("com.jfrog.bintray") version Versions.gradleBintrayPlugin apply false
20+
id("com.diffplug.spotless") version Versions.gradleSpotlessPlugin
21+
id("com.github.johnrengelman.shadow") version Versions.gradleShadowPlugin apply false
22+
id("io.micronaut.application") version Versions.gradleMicronautPlugin apply false
23+
id("io.micronaut.library") version Versions.gradleMicronautPlugin apply false
24+
kotlin("jvm") version Versions.kotlin apply false
25+
}
26+
27+
java {
28+
sourceCompatibility = JavaVersion.VERSION_11
29+
targetCompatibility = JavaVersion.VERSION_11
30+
}
31+
32+
buildtimetracker {
33+
reporters {
34+
register("summary") {
35+
options["ordered"] = "true"
36+
options["barstyle"] = "none"
37+
options["shortenTaskNames"] = "false"
38+
}
39+
}
40+
}
41+
42+
allprojects {
43+
apply(plugin = "idea")
44+
apply(plugin = "net.rdrei.android.buildtimetracker")
45+
apply(plugin = "com.diffplug.spotless")
46+
47+
idea {
48+
module {
49+
isDownloadJavadoc = false
50+
isDownloadSources = false
51+
}
52+
}
53+
54+
repositories {
55+
mavenLocal()
56+
gradlePluginPortal()
57+
jcenter()
58+
mavenCentral()
59+
maven { url = uri("https://dl.bintray.com/expatiat/jambalaya") }
60+
}
61+
62+
spotless {
63+
java {
64+
licenseHeaderFile("$rootDir/gradle/licenseHeader.txt")
65+
removeUnusedImports()
66+
trimTrailingWhitespace()
67+
endWithNewline()
68+
}
69+
kotlin {
70+
licenseHeaderFile("$rootDir/gradle/licenseHeader.txt")
71+
}
72+
kotlinGradle {
73+
ktlint()
74+
}
75+
}
76+
77+
tasks.withType<JavaCompile> {
78+
options.release.set(11)
79+
}
80+
}
81+
82+
val publishingProjects = setOf(
83+
"dumper-share",
84+
"dumper-test"
85+
)
86+
87+
subprojects {
88+
apply(plugin = "java")
89+
apply(plugin = "com.adarshr.test-logger")
90+
if (publishingProjects.contains(project.name)) {
91+
apply(plugin = "java-library")
92+
apply(plugin = "maven-publish")
93+
apply(plugin = "com.jfrog.bintray")
94+
}
95+
96+
group = "com.zhokhov.dumper"
97+
98+
java {
99+
sourceCompatibility = JavaVersion.VERSION_11
100+
targetCompatibility = JavaVersion.VERSION_11
101+
102+
withJavadocJar()
103+
withSourcesJar()
104+
}
105+
106+
dependencies {
107+
// SpotBugs
108+
implementation("com.github.spotbugs:spotbugs-annotations:${Versions.spotbugsAnnotations}")
109+
110+
// JUnit
111+
testImplementation("org.junit.jupiter:junit-jupiter-api:${Versions.junit}")
112+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Versions.junit}")
113+
}
114+
115+
if (publishingProjects.contains(project.name)) {
116+
publishing {
117+
publications {
118+
create<MavenPublication>("mavenJava") {
119+
from(components["java"])
120+
versionMapping {
121+
allVariants {
122+
fromResolutionResult()
123+
}
124+
}
125+
}
126+
}
127+
}
128+
129+
configure<BintrayExtension> {
130+
user = System.getenv("BINTRAY_USER")
131+
key = System.getenv("BINTRAY_KEY")
132+
publish = true
133+
override = true
134+
setPublications("mavenJava")
135+
pkg.apply {
136+
repo = "dumper"
137+
name = "dumper"
138+
userOrg = "expatiat"
139+
vcsUrl = "https://github.com/expatiat/dumper.git"
140+
setLicenses("Apache-2.0")
141+
}
142+
}
143+
}
144+
145+
tasks.withType<KotlinCompile> {
146+
kotlinOptions {
147+
jvmTarget = "11"
148+
}
149+
}
150+
151+
tasks.withType<Test> {
152+
useJUnitPlatform {
153+
includeEngines = setOf("junit-jupiter")
154+
excludeEngines = setOf("junit-vintage")
155+
}
156+
}
157+
}

buildSrc/build.gradle.kts

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
/*
2-
* This file was generated by the Gradle 'init' task.
3-
*/
4-
51
plugins {
6-
// Support convention plugins written in Kotlin. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build.
72
`kotlin-dsl`
3+
idea
84
}
95

106
repositories {
11-
// Use the plugin portal to apply community plugins in convention plugins.
7+
mavenLocal()
128
gradlePluginPortal()
9+
jcenter()
10+
mavenCentral()
11+
}
12+
13+
idea {
14+
module {
15+
isDownloadJavadoc = false
16+
isDownloadSources = false
17+
}
1318
}

buildSrc/src/main/java/Versions.kt

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
object Versions {
2+
3+
// Languages
4+
5+
const val kotlin = "1.4.21"
6+
7+
// Gradle plugins
8+
9+
// https://plugins.gradle.org/plugin/com.adarshr.test-logger
10+
const val gradleTestLoggerPlugin = "2.1.1"
11+
12+
// https://plugins.gradle.org/plugin/net.rdrei.android.buildtimetracker
13+
const val gradleBuildTimeTrackerPlugin = "0.11.0"
14+
15+
// https://plugins.gradle.org/plugin/com.jfrog.bintray
16+
const val gradleBintrayPlugin = "1.8.5"
17+
18+
// https://plugins.gradle.org/plugin/com.diffplug.spotless
19+
const val gradleSpotlessPlugin = "5.8.2"
20+
21+
// https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow
22+
const val gradleShadowPlugin = "6.1.0"
23+
24+
// https://plugins.gradle.org/plugin/io.micronaut.application
25+
const val gradleMicronautPlugin = "1.2.0"
26+
27+
// Libraries
28+
29+
const val micronaut = "2.2.3"
30+
31+
// UPDATE together with Micronaut
32+
// https://repo1.maven.org/maven2/io/micronaut/micronaut-bom/2.2.3/micronaut-bom-2.2.3.pom
33+
// https://repo1.maven.org/maven2/io/micronaut/sql/micronaut-jooq/3.3.5/micronaut-jooq-3.3.5.pom
34+
// https://repo1.maven.org/maven2/io/grpc/grpc-bom/1.33.1/grpc-bom-1.33.1.pom
35+
// https://repo1.maven.org/maven2/io/grpc/grpc-protobuf/1.33.1/grpc-protobuf-1.33.1.pom
36+
const val postgresql = "42.2.18"
37+
const val grpc = "1.33.1"
38+
const val flyway = "7.0.4"
39+
const val jooq = "3.14.4"
40+
const val protobuf = "3.14.0"
41+
const val spotbugs = "4.0.3"
42+
const val slf4j = "1.7.26"
43+
const val picocli = "4.5.2"
44+
// end
45+
46+
const val spotbugsAnnotations = "4.2.0"
47+
const val junit = "5.6.2"
48+
const val slugify = "2.4"
49+
50+
// Project
51+
52+
const val jambalayaChecks = "0.1.1"
53+
54+
}

buildSrc/src/main/kotlin/com.zhokhov.dumper.java-application-conventions.gradle.kts

-11
This file was deleted.

buildSrc/src/main/kotlin/com.zhokhov.dumper.java-common-conventions.gradle.kts

-26
This file was deleted.

buildSrc/src/main/kotlin/com.zhokhov.dumper.java-library-conventions.gradle.kts

-11
This file was deleted.

dumper-cli/.tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
java graalvm-20.3.0+java11

0 commit comments

Comments
 (0)