Skip to content

Commit 39c38fb

Browse files
authored
Merge pull request #28 from JavaSaBr/develop
merge develop to master
2 parents 2b2d238 + 72b6a5c commit 39c38fb

File tree

21 files changed

+548
-349
lines changed

21 files changed

+548
-349
lines changed

build.gradle

Lines changed: 108 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,128 @@
1-
buildscript {
2-
repositories {
3-
maven { url 'https://plugins.gradle.org/m2/' }
4-
}
5-
dependencies {
6-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
7-
classpath 'net.ltgt.gradle:gradle-apt-plugin:0.21'
8-
}
9-
}
10-
11-
rootProject.version = '9.9.0'
12-
group = 'com.spaceshift'
13-
14-
allprojects {
15-
16-
repositories {
17-
mavenCentral()
18-
jcenter()
19-
}
1+
rootProject.version = "9.10.0"
2+
group = 'javasabr'
203

21-
apply plugin: 'java'
22-
apply plugin: 'com.jfrog.bintray'
23-
apply plugin: 'maven-publish'
24-
25-
sourceCompatibility = JavaVersion.VERSION_11
26-
targetCompatibility = JavaVersion.VERSION_11
27-
28-
ext {
29-
projectreactorVersion = '3.2.9.RELEASE'
30-
sl4jVersion = '1.7.26'
31-
javaxMailVersion = "1.5.0-b01"
32-
testcontainersVersion = '1.11.1'
33-
lombokVersion = '1.18.6'
34-
junitJupiterVersion = "5.4.2"
35-
jetbrainsAnnotation = '17.0.0'
36-
bintrayVersion = version
37-
}
4+
subprojects {
385

39-
javadoc {
40-
failOnError = false
41-
}
6+
repositories {
7+
mavenCentral()
8+
}
429

43-
test {
44-
useJUnitPlatform()
45-
}
10+
apply plugin: "java-library"
11+
apply plugin: "java-test-fixtures"
12+
apply plugin: 'maven-publish'
4613

47-
dependencies {
48-
compileOnly "org.jetbrains:annotations:$jetbrainsAnnotation"
49-
compileOnly "org.projectlombok:lombok:$lombokVersion"
50-
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
51-
52-
testCompile "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
53-
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
54-
testCompileOnly "org.jetbrains:annotations:$jetbrainsAnnotation"
55-
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
56-
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
14+
java {
15+
toolchain {
16+
languageVersion = JavaLanguageVersion.of(21)
5717
}
58-
59-
/*compileJava {
60-
inputs.property("moduleName", jar.baseName)
61-
doFirst {
62-
options.compilerArgs = [
63-
'--module-path', classpath.asPath,
64-
]
65-
classpath = files()
66-
}
67-
}*/
68-
69-
task sourcesJar(type: Jar, dependsOn: classes) {
70-
afterEvaluate {
71-
getArchiveClassifier().set("sources")
72-
getArchiveBaseName().set(jar.getArchiveBaseName())
73-
from sourceSets.main.allSource
18+
}
19+
20+
javadoc {
21+
failOnError = false
22+
}
23+
24+
test {
25+
useJUnitPlatform()
26+
failOnNoDiscoveredTests = false
27+
}
28+
29+
dependencies {
30+
compileOnly libs.jetbrains.annotations
31+
compileOnly libs.jspecify
32+
compileOnly libs.lombok
33+
annotationProcessor libs.lombok
34+
35+
testImplementation libs.junit.api
36+
testCompileOnly libs.lombok
37+
testCompileOnly libs.jetbrains.annotations
38+
testCompileOnly libs.jspecify
39+
testRuntimeOnly libs.junit.engine
40+
testRuntimeOnly libs.junit.platform.launcher
41+
testAnnotationProcessor libs.lombok
42+
}
43+
44+
/*compileJava {
45+
inputs.property("moduleName", jar.baseName)
46+
doFirst {
47+
options.compilerArgs = [
48+
'--module-path', classpath.asPath,
49+
]
50+
classpath = files()
51+
}
52+
}*/
53+
54+
tasks.withType(JavaCompile).configureEach {
55+
options.encoding = "UTF-8"
56+
}
57+
58+
tasks.withType(Javadoc).configureEach {
59+
options.encoding = "UTF-8"
60+
}
61+
62+
tasks.register("sourcesJar", Jar) {
63+
dependsOn "classes"
64+
group "build"
65+
archiveClassifier = "sources"
66+
archiveBaseName = jar.archiveBaseName
67+
from sourceSets.main.allSource
68+
}
69+
70+
tasks.register("javadocJar", Jar) {
71+
dependsOn "javadoc"
72+
group "build"
73+
archiveClassifier = "javadoc"
74+
archiveBaseName = jar.archiveBaseName
75+
from sourceSets.main.allSource
76+
}
77+
78+
publishing {
79+
repositories {
80+
maven {
81+
name = "GitlabPackages"
82+
url = uri("https://gitlab.com/api/v4/projects/37512056/packages/maven")
83+
credentials(HttpHeaderCredentials) {
84+
name = "Private-Token"
85+
value = project.findProperty("gitlab.token") ?: System.getenv("GITLAB_TOKEN")
7486
}
75-
}
76-
77-
task javadocJar(type: Jar, dependsOn: javadoc) {
78-
afterEvaluate {
79-
getArchiveClassifier().set("javadoc")
80-
getArchiveBaseName().set(jar.getArchiveBaseName())
81-
from sourceSets.main.allSource
87+
authentication {
88+
header(HttpHeaderAuthentication)
8289
}
90+
}
8391
}
8492

85-
publishing {
86-
publications {
87-
mavenJava(MavenPublication) {
88-
from components.java
89-
artifact sourcesJar
90-
artifact javadocJar
91-
version = rootProject.version
92-
afterEvaluate {
93-
artifactId = jar.baseName
94-
groupId = rootProject.group
95-
}
96-
}
97-
}
98-
}
99-
100-
bintray {
93+
publications {
94+
mavenJava(MavenPublication) {
95+
from components.java
96+
version = rootProject.version
10197
afterEvaluate {
102-
user = project.hasProperty("bintrayUser") ? project.property("bintrayUser") : ""
103-
key = project.hasProperty("bintrayKey") ? project.property("bintrayKey") : ""
104-
publications = ['mavenJava']
105-
pkg {
106-
repo = 'maven'
107-
name = 'com.spaceshift.' + jar.baseName
108-
licenses = ['Apache-2.0']
109-
websiteUrl = 'https://github.com/JavaSaBr/Rlib'
110-
vcsUrl = 'https://github.com/JavaSaBr/RLib.git'
111-
issueTrackerUrl = 'https://github.com/JavaSaBr/RLib/issues'
112-
githubRepo = 'JavaSaBr/RLib'
113-
githubReleaseNotesFile = 'README.md'
114-
version {
115-
name = rootProject.version
116-
desc = rootProject.version
117-
released = new Date()
118-
}
119-
}
98+
artifactId = jar.archiveBaseName.get()
99+
groupId = rootProject.group
120100
}
101+
artifact sourcesJar
102+
artifact javadocJar
103+
}
121104
}
105+
}
122106

123-
configurations {
124-
testArtifacts.extendsFrom testRuntime
125-
}
107+
configurations {
108+
testArtifacts.extendsFrom testRuntime
109+
}
126110

127-
task testJar(type: Jar) {
128-
getArchiveClassifier().set("test")
129-
from sourceSets.test.output
130-
}
111+
tasks.register('testJar', Jar) {
112+
archiveClassifier = "test"
113+
from sourceSets.test.output
114+
}
131115

132-
artifacts {
133-
testArtifacts testJar
134-
}
116+
artifacts {
117+
testArtifacts testJar
118+
}
135119

136-
tasks.withType(Test) {
137-
maxParallelForks = Runtime.runtime.availableProcessors()
138-
}
120+
tasks.withType(Test).configureEach {
121+
maxParallelForks = Runtime.runtime.availableProcessors()
122+
}
139123
}
140124

141125
wrapper {
142-
gradleVersion = '6.0'
143-
distributionType = Wrapper.DistributionType.ALL
126+
gradleVersion = '9.0.0'
127+
distributionType = Wrapper.DistributionType.ALL
144128
}

gradle/libs.versions.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[versions]
2+
# https://mvnrepository.com/artifact/org.slf4j/slf4j-api
3+
slf4j = "2.0.17"
4+
# https://mvnrepository.com/artifact/io.projectreactor/reactor-core
5+
project-reactor = "3.7.8"
6+
# https://mvnrepository.com/artifact/jakarta.mail/jakarta.mail-api
7+
jakarta-mail = "2.1.3"
8+
# https://mvnrepository.com/artifact/org.eclipse.angus/angus-mail
9+
angus-mail = "2.0.4"
10+
# https://mvnrepository.com/artifact/org.testcontainers/testcontainers
11+
testcontainers = "1.21.3"
12+
# https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine
13+
junit-jupiter = "5.13.4"
14+
# https://mvnrepository.com/artifact/org.jetbrains/annotations
15+
jetbrains-annotations = "26.0.2"
16+
# https://mvnrepository.com/artifact/org.projectlombok/lombok
17+
lombok = "1.18.38"
18+
# https://mvnrepository.com/artifact/org.jspecify/jspecify
19+
jspecify = "1.0.0"
20+
# https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher
21+
junit-platform-launcher = "1.13.4"
22+
23+
[libraries]
24+
project-reactor-core = { module = "io.projectreactor:reactor-core", version.ref = "project-reactor" }
25+
jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrains-annotations" }
26+
jspecify = { module = "org.jspecify:jspecify", version.ref = "jspecify" }
27+
lombok = { module = "org.projectlombok:lombok", version.ref = "lombok" }
28+
junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit-jupiter" }
29+
junit-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit-jupiter" }
30+
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junit-platform-launcher" }
31+
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
32+
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" }
33+
slf4j-ext = { module = "org.slf4j:slf4j-ext", version.ref = "slf4j" }
34+
jakarta-mail-api = { module = "jakarta.mail:jakarta.mail-api", version.ref = "jakarta-mail" }
35+
angus-mail = { module = "org.eclipse.angus:angus-mail", version.ref = "angus-mail" }
36+
testcontainers = { module = "org.testcontainers:testcontainers", version.ref = "testcontainers" }
37+
38+
[bundles]
39+
junit = ["junit-engine", "junit-api"]
40+
mail = ["jakarta-mail-api", "angus-mail"]

gradle/wrapper/gradle-wrapper.jar

-9.5 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-all.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)