Skip to content

Commit 644d696

Browse files
Merge pull request #22 from CodeCraftersCN/release/1.2.2-gradle
Release/1.2.2-gradle
2 parents 367a96b + 795bd63 commit 644d696

File tree

27 files changed

+1463
-1002
lines changed

27 files changed

+1463
-1002
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,7 @@ build/
3636
.vscode/
3737

3838
### Mac OS ###
39-
.DS_Store
39+
.DS_Store
40+
41+
### Gradle ###
42+
.gradle

build.gradle.kts

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* Copyright (C) 2023 CodeCraftersCN.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
*
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
val projectUrl by extra("https://codecrafters.org.cn/JDevKit")
19+
val projectGithubUrl by extra("https://github.com/CodeCraftersCN/JDevKit")
20+
val globalGroupId by extra("cn.org.codecrafters")
21+
val globalVersion by extra("1.2.2-gradle")
22+
val licenseName by extra("The Apache License, Version 2.0")
23+
val licenseUrl by extra("https://www.apache.org/licenses/LICENSE-2.0.txt")
24+
25+
val logbackVersion: String by project
26+
val junitVersion: String by project
27+
val slf4jVersion: String by project
28+
val lombokVersion: String by project
29+
30+
subprojects {
31+
apply(plugin = "java")
32+
apply(plugin = "java-library")
33+
apply(plugin = "maven-publish")
34+
apply(plugin = "signing")
35+
36+
val implementation by configurations
37+
val testImplementation by configurations
38+
val compileOnly by configurations
39+
val annotationProcessor by configurations
40+
val testAnnotationProcessor by configurations
41+
val testCompileOnly by configurations
42+
43+
dependencies {
44+
compileOnly("org.slf4j:slf4j-api:$slf4jVersion")
45+
compileOnly("org.projectlombok:lombok:$lombokVersion")
46+
implementation("ch.qos.logback:logback-classic:$logbackVersion")
47+
annotationProcessor("org.slf4j:slf4j-api:$slf4jVersion")
48+
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
49+
50+
testCompileOnly("org.slf4j:slf4j-api:$slf4jVersion")
51+
testCompileOnly("org.projectlombok:lombok:$lombokVersion")
52+
testImplementation("org.junit.jupiter:junit-jupiter:$junitVersion")
53+
testAnnotationProcessor("org.slf4j:slf4j-api:$slf4jVersion")
54+
testAnnotationProcessor("org.projectlombok:lombok:$lombokVersion")
55+
}
56+
57+
repositories {
58+
mavenLocal()
59+
maven(url = "https://codecrafters.coding.net/public-artifacts/base/public/packages/")
60+
maven(url = "https://maven.proxy.ustclug.org.cn/maven2/")
61+
mavenCentral()
62+
}
63+
64+
tasks.withType<JavaCompile> {
65+
options.encoding = "UTF-8"
66+
}
67+
}

devkit-core/build.gradle.kts

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
import java.net.URI
2+
3+
val globalGroupId: String by rootProject.extra
4+
val globalVersion: String by rootProject.extra
5+
val projectUrl: String by rootProject.extra
6+
val projectGithubUrl: String by rootProject.extra
7+
val licenseName: String by rootProject.extra
8+
val licenseUrl: String by rootProject.extra
9+
10+
group = globalGroupId
11+
version = globalVersion
12+
13+
java {
14+
sourceCompatibility = JavaVersion.VERSION_17
15+
targetCompatibility = JavaVersion.VERSION_17
16+
withSourcesJar()
17+
withJavadocJar()
18+
}
19+
20+
tasks.test {
21+
useJUnitPlatform()
22+
}
23+
24+
publishing {
25+
publications {
26+
create<MavenPublication>("devkitCore") {
27+
groupId = globalGroupId
28+
artifactId = "devkit-core"
29+
version = globalVersion
30+
31+
pom {
32+
name = "DevKit - Core"
33+
description = "The core module of JDevKit."
34+
url = projectUrl
35+
36+
licenses {
37+
license {
38+
name = licenseName
39+
url = licenseUrl
40+
}
41+
}
42+
43+
scm {
44+
connection = "scm:git:git://github.com:CodeCraftersCN/JDevKit.git"
45+
developerConnection = "scm:git:git://github.com:CodeCraftersCN/JDevKit.git"
46+
url = projectGithubUrl
47+
}
48+
49+
developers {
50+
developer {
51+
id = "zihluwang"
52+
name = "Zihlu Wang"
53+
email = "really@zihlu.wang"
54+
timezone = "Asia/Hong_Kong"
55+
}
56+
}
57+
}
58+
59+
from(components["java"])
60+
61+
signing {
62+
sign(publishing.publications["devkitCore"])
63+
}
64+
}
65+
66+
repositories {
67+
maven {
68+
name = "sonatypeNexus"
69+
url = URI(providers.gradleProperty("repo.maven-central.host").get())
70+
credentials {
71+
username = providers.gradleProperty("repo.maven-central.username").get()
72+
password = providers.gradleProperty("repo.maven-central.password").get()
73+
}
74+
}
75+
76+
maven {
77+
name = "codingNexus"
78+
url = URI(providers.gradleProperty("repo.coding.host").get())
79+
credentials {
80+
username = providers.gradleProperty("repo.coding.username").get()
81+
password = providers.gradleProperty("repo.coding.password").get()
82+
}
83+
}
84+
85+
maven {
86+
name = "githubPackages"
87+
url = URI(providers.gradleProperty("repo.github.host").get())
88+
credentials {
89+
username = providers.gradleProperty("repo.github.username").get()
90+
password = providers.gradleProperty("repo.github.password").get()
91+
}
92+
}
93+
}
94+
}
95+
}

devkit-core/pom.xml

Lines changed: 0 additions & 37 deletions
This file was deleted.

devkit-utils/build.gradle.kts

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import java.net.URI
2+
3+
val globalGroupId: String by rootProject.extra
4+
val globalVersion: String by rootProject.extra
5+
val projectUrl: String by rootProject.extra
6+
val projectGithubUrl: String by rootProject.extra
7+
val licenseName: String by rootProject.extra
8+
val licenseUrl: String by rootProject.extra
9+
10+
group = globalGroupId
11+
version = globalVersion
12+
13+
dependencies {
14+
implementation(project(":devkit-core"))
15+
}
16+
17+
java {
18+
sourceCompatibility = JavaVersion.VERSION_17
19+
targetCompatibility = JavaVersion.VERSION_17
20+
withSourcesJar()
21+
withJavadocJar()
22+
}
23+
24+
tasks.test {
25+
useJUnitPlatform()
26+
}
27+
28+
publishing {
29+
publications {
30+
create<MavenPublication>("devkitUtils") {
31+
groupId = globalGroupId
32+
artifactId = "devkit-utils"
33+
version = globalVersion
34+
35+
pom {
36+
name = "DevKit - Utils"
37+
description = "The utils module of JDevKit."
38+
url = projectUrl
39+
40+
licenses {
41+
license {
42+
name = licenseName
43+
url = licenseUrl
44+
}
45+
}
46+
47+
scm {
48+
connection = "scm:git:git://github.com:CodeCraftersCN/JDevKit.git"
49+
developerConnection = "scm:git:git://github.com:CodeCraftersCN/JDevKit.git"
50+
url = projectGithubUrl
51+
}
52+
53+
developers {
54+
developer {
55+
id = "zihluwang"
56+
name = "Zihlu Wang"
57+
email = "really@zihlu.wang"
58+
timezone = "Asia/Hong_Kong"
59+
}
60+
}
61+
}
62+
63+
from(components["java"])
64+
65+
signing {
66+
sign(publishing.publications["devkitUtils"])
67+
}
68+
}
69+
70+
repositories {
71+
maven {
72+
name = "sonatypeNexus"
73+
url = URI(providers.gradleProperty("repo.maven-central.host").get())
74+
credentials {
75+
username = providers.gradleProperty("repo.maven-central.username").get()
76+
password = providers.gradleProperty("repo.maven-central.password").get()
77+
}
78+
}
79+
80+
maven {
81+
name = "codingNexus"
82+
url = URI(providers.gradleProperty("repo.coding.host").get())
83+
credentials {
84+
username = providers.gradleProperty("repo.coding.username").get()
85+
password = providers.gradleProperty("repo.coding.password").get()
86+
}
87+
}
88+
89+
maven {
90+
name = "githubPackages"
91+
url = URI(providers.gradleProperty("repo.github.host").get())
92+
credentials {
93+
username = providers.gradleProperty("repo.github.username").get()
94+
password = providers.gradleProperty("repo.github.password").get()
95+
}
96+
}
97+
}
98+
}
99+
}

devkit-utils/pom.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.

gradle.properties

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#
2+
# Copyright (C) 2023 CodeCraftersCN.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
#
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
logbackVersion=1.4.13
19+
junitVersion=5.10.1
20+
slf4jVersion=2.0.9
21+
lombokVersion=1.18.30
22+
jacksonVersion=2.16.0
23+
javaJwtVersion=4.4.0
24+
jjwtVersion=0.11.5
25+
okhttpVersion=4.12.0
26+
springVersion=6.1.1
27+
springBootVersion=3.2.0

gradle/wrapper/gradle-wrapper.jar

42.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)