Skip to content

Commit 3f19715

Browse files
committed
gradle 7.5.1 build (with sources, errorprone ready) + adapted gitignores
1 parent 0359cb5 commit 3f19715

File tree

9 files changed

+218
-2
lines changed

9 files changed

+218
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea
22
target
33
*.iml
4+
.gradle
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

jOOL-java-8/.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,16 @@ target
33
*.iml
44
.classpath
55
.settings
6-
.project
6+
.project
7+
8+
build/
9+
**/build/
10+
!**/src/main/**/build/
11+
!**/src/test/**/build/
12+
out/
13+
**/out/
14+
!**/src/main/**/out/
15+
!**/src/test/**/out/
16+
17+
*.class
18+
.gradle

jOOL-java-8/build.gradle

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
plugins {
2+
id 'java-library'
3+
id 'idea'
4+
id 'maven-publish'
5+
id "net.ltgt.errorprone" version "2.0.2"
6+
}
7+
8+
repositories {
9+
mavenCentral()
10+
}
11+
12+
// sourceCompatibility = 1.8
13+
// https://docs.gradle.org/current/userguide/toolchains.html
14+
java {
15+
toolchain {
16+
languageVersion = JavaLanguageVersion.of(8)
17+
}
18+
}
19+
20+
javadoc {
21+
options.encoding = 'UTF-8'
22+
if(JavaVersion.current().isJava9Compatible()) {
23+
options.addBooleanOption('html5', true)
24+
}
25+
}
26+
27+
gradle.projectsEvaluated {
28+
tasks.withType(JavaCompile).configureEach {
29+
options.encoding = 'UTF-8'
30+
options.compilerArgs.addAll(['-Xlint:all', '-parameters', '-g', '-Xmaxwarns', '999'])
31+
//options.release = 8 // javac --release 8
32+
options.deprecation = true
33+
options.annotationProcessorPath = configurations.errorprone
34+
35+
options.errorprone {
36+
enabled = false
37+
disableWarningsInGeneratedCode = true
38+
excludedPaths = ".*/build/gen.*/.*"
39+
//disable("ParameterName") disable("UnusedVariable")
40+
errorproneArgs = ["--illegal-access=warn"]
41+
}
42+
}
43+
}
44+
45+
publishing {
46+
publications {
47+
maven(MavenPublication) {
48+
from components.java
49+
}
50+
}
51+
}
52+
tasks.withType(GenerateModuleMetadata) {
53+
enabled = false // don't generate Gradle's json metadata
54+
}
55+
56+
// https://docs.gradle.org/current/userguide/publishing_maven.html
57+
java {
58+
withSourcesJar()
59+
withJavadocJar()
60+
}
61+
62+
dependencies {
63+
errorprone "com.google.errorprone:error_prone_core:latest.release"
64+
65+
implementation 'org.slf4j:slf4j-api:1.7.+'
66+
67+
testImplementation 'junit:junit:4.+'
68+
testImplementation 'org.mockito:mockito-inline:+'
69+
testImplementation "com.google.truth:truth:+"
70+
testImplementation "com.google.truth.extensions:truth-java8-extension:+"
71+
}
72+
73+
idea {
74+
module {
75+
downloadJavadoc = true
76+
downloadSources = true
77+
}
78+
}
79+
80+
test {
81+
useJUnit()
82+
maxHeapSize = "500m"
83+
enableAssertions = true
84+
85+
testLogging.showStandardStreams = true // show standard out & err of the test JVM on the console
86+
87+
System.setProperty("slf4j.detectLoggerNameMismatch", "true")
88+
System.setProperty("file.encoding", "UTF-8")
89+
}

jOOL-java-8/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
group=org.jooq
2+
3+
version=0.9.15

jOOL/.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,16 @@ target
33
*.iml
44
.classpath
55
.settings
6-
.project
6+
.project
7+
8+
build/
9+
**/build/
10+
!**/src/main/**/build/
11+
!**/src/test/**/build/
12+
out/
13+
**/out/
14+
!**/src/main/**/out/
15+
!**/src/test/**/out/
16+
17+
*.class
18+
.gradle

jOOL/build.gradle

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
plugins {
2+
id 'java-library'
3+
id 'idea'
4+
id 'maven-publish'
5+
id "net.ltgt.errorprone" version "2.0.2"
6+
}
7+
8+
repositories {
9+
mavenCentral()
10+
}
11+
12+
// sourceCompatibility = 1.11
13+
// https://docs.gradle.org/current/userguide/toolchains.html
14+
java {
15+
toolchain {
16+
languageVersion = JavaLanguageVersion.of(11)
17+
}
18+
}
19+
20+
javadoc {
21+
options.encoding = 'UTF-8'
22+
options.addBooleanOption('html5', true)
23+
}
24+
25+
gradle.projectsEvaluated {
26+
tasks.withType(JavaCompile).configureEach {
27+
options.encoding = 'UTF-8'
28+
options.compilerArgs.addAll(['-Xlint:all', '-parameters', '-g', '-Xmaxwarns', '999'])
29+
//options.release = 11 // javac --release 11
30+
options.deprecation = true
31+
options.annotationProcessorPath = configurations.errorprone
32+
33+
options.errorprone {
34+
enabled = false
35+
disableWarningsInGeneratedCode = true
36+
excludedPaths = ".*/build/gen.*/.*"
37+
//disable("ParameterName") disable("UnusedVariable")
38+
errorproneArgs = ["--illegal-access=warn"]
39+
}
40+
}
41+
}
42+
43+
publishing {
44+
publications {
45+
maven(MavenPublication) {
46+
from components.java
47+
}
48+
}
49+
}
50+
tasks.withType(GenerateModuleMetadata) {
51+
enabled = false // don't generate Gradle's json metadata
52+
}
53+
54+
// https://docs.gradle.org/current/userguide/publishing_maven.html
55+
java {
56+
withSourcesJar()
57+
withJavadocJar()
58+
}
59+
60+
dependencies {
61+
errorprone "com.google.errorprone:error_prone_core:latest.release"
62+
63+
implementation 'org.slf4j:slf4j-api:1.7.+'
64+
65+
testImplementation 'junit:junit:4.+'
66+
testImplementation 'org.mockito:mockito-inline:+'
67+
testImplementation "com.google.truth:truth:+"
68+
testImplementation "com.google.truth.extensions:truth-java8-extension:+"
69+
}
70+
71+
idea {
72+
module {
73+
downloadJavadoc = true
74+
downloadSources = true
75+
}
76+
}
77+
78+
test {
79+
useJUnit()
80+
maxHeapSize = "500m"
81+
enableAssertions = true
82+
83+
testLogging.showStandardStreams = true // show standard out & err of the test JVM on the console
84+
85+
System.setProperty("slf4j.detectLoggerNameMismatch", "true")
86+
System.setProperty("file.encoding", "UTF-8")
87+
}

jOOL/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
group=org.jooq
2+
3+
version=0.9.15

settings.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
include 'jool-java-8'
3+
4+
include 'jool'

0 commit comments

Comments
 (0)