Skip to content

Commit 152dc91

Browse files
author
Zihlu Wang
authored
Merge pull request #43 from OnixByte/develop
v1.6.6: Num4j was not correctly built and published
2 parents a52cb66 + 72ccafb commit 152dc91

File tree

12 files changed

+136
-66
lines changed

12 files changed

+136
-66
lines changed

.github/workflows/github-packages-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ jobs:
6161
run: chmod +x ./gradlew
6262

6363
- name: Build with Gradle
64-
run: ./gradlew build -PartefactVersion=${{ github.event.release.tag_name }} # Overwrite artefactVersion
64+
# Overwrite artefactVersion with tag name
65+
run: ./gradlew build -PartefactVersion=${{ github.event.release.tag_name }}
6566

6667
- name: Publish to Maven Central
6768
run: ./gradlew publish

devkit-core/build.gradle.kts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717

1818
import java.net.URI
1919

20-
val buildGroupId: String by project
21-
val buildVersion: String by project
20+
val artefactVersion: String by project
2221
val projectUrl: String by project
2322
val projectGithubUrl: String by project
2423
val licenseName: String by project
2524
val licenseUrl: String by project
2625

27-
group = buildGroupId
28-
version = buildVersion
26+
group = "com.onixbyte"
27+
version = artefactVersion
2928

3029
java {
3130
sourceCompatibility = JavaVersion.VERSION_17
@@ -41,9 +40,9 @@ tasks.test {
4140
publishing {
4241
publications {
4342
create<MavenPublication>("devkitCore") {
44-
groupId = buildGroupId
43+
groupId = group.toString()
4544
artifactId = "devkit-core"
46-
version = buildVersion
45+
version = artefactVersion
4746

4847
pom {
4948
name = "DevKit - Core"

devkit-utils/build.gradle.kts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717

1818
import java.net.URI
1919

20-
val buildGroupId: String by project
21-
val buildVersion: String by project
20+
val artefactVersion: String by project
2221
val projectUrl: String by project
2322
val projectGithubUrl: String by project
2423
val licenseName: String by project
2524
val licenseUrl: String by project
2625

27-
group = buildGroupId
28-
version = buildVersion
26+
group = "com.onixbyte"
27+
version = artefactVersion
2928

3029
dependencies {
3130
implementation(project(":devkit-core"))
@@ -45,9 +44,9 @@ tasks.test {
4544
publishing {
4645
publications {
4746
create<MavenPublication>("devkitUtils") {
48-
groupId = buildGroupId
47+
groupId = group.toString()
4948
artifactId = "devkit-utils"
50-
version = buildVersion
49+
version = artefactVersion
5150

5251
pom {
5352
name = "DevKit - Utils"

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ slf4jVersion=2.0.16
2424
springVersion=6.1.13
2525
springBootVersion=3.3.4
2626

27-
buildGroupId=com.onixbyte
28-
buildVersion=1.6.5
27+
artefactVersion=1.6.5
2928
projectUrl=https://onixbyte.com/JDevKit
3029
projectGithubUrl=https://github.com/OnixByte/JDevKit
3130
licenseName=The Apache License, Version 2.0

guid/build.gradle.kts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717

1818
import java.net.URI
1919

20-
val buildGroupId: String by project
21-
val buildVersion: String by project
20+
val artefactVersion: String by project
2221
val projectUrl: String by project
2322
val projectGithubUrl: String by project
2423
val licenseName: String by project
2524
val licenseUrl: String by project
2625

27-
group = buildGroupId
28-
version = buildVersion
26+
group = "com.onixbyte"
27+
version = artefactVersion
2928

3029
dependencies {
3130
implementation(project(":devkit-core"))
@@ -45,9 +44,9 @@ tasks.test {
4544
publishing {
4645
publications {
4746
create<MavenPublication>("guid") {
48-
groupId = buildGroupId
47+
groupId = group.toString()
4948
artifactId = "guid"
50-
version = buildVersion
49+
version = artefactVersion
5150

5251
pom {
5352
name = "DevKit - GUID"

key-pair-loader/build.gradle.kts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717

1818
import java.net.URI
1919

20-
val buildGroupId: String by project
21-
val buildVersion: String by project
20+
val artefactVersion: String by project
2221
val projectUrl: String by project
2322
val projectGithubUrl: String by project
2423
val licenseName: String by project
2524
val licenseUrl: String by project
2625

27-
group = buildGroupId
28-
version = buildVersion
26+
group = "com.onixbyte"
27+
version = artefactVersion
2928

3029
dependencies {
3130
implementation(project(":devkit-core"))
@@ -45,9 +44,9 @@ tasks.test {
4544
publishing {
4645
publications {
4746
create<MavenPublication>("keyPairLoader") {
48-
groupId = buildGroupId
47+
groupId = group.toString()
4948
artifactId = "key-pair-loader"
50-
version = buildVersion
49+
version = artefactVersion
5150

5251
pom {
5352
name = "Key Pair Loader"

map-util-unsafe/build.gradle.kts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717

1818
import java.net.URI
1919

20-
val buildGroupId: String by project
21-
val buildVersion: String by project
20+
val artefactVersion: String by project
2221
val projectUrl: String by project
2322
val projectGithubUrl: String by project
2423
val licenseName: String by project
2524
val licenseUrl: String by project
2625

27-
group = buildGroupId
28-
version = buildVersion
26+
group = "com.onixbyte"
27+
version = artefactVersion
2928

3029
dependencies {
3130
implementation(project(":devkit-core"))
@@ -45,9 +44,9 @@ tasks.test {
4544
publishing {
4645
publications {
4746
create<MavenPublication>("mapUtilUnsafe") {
48-
groupId = buildGroupId
47+
groupId = group.toString()
4948
artifactId = "map-util-unsafe"
50-
version = buildVersion
49+
version = artefactVersion
5150

5251
pom {
5352
name = "Unsafe Map Util"

num4j/build.gradle.kts

Lines changed: 88 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,98 @@
1-
plugins {
2-
id("java")
3-
}
1+
/*
2+
* Copyright (C) 2024-2024 OnixByte.
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+
import java.net.URI
19+
20+
val artefactVersion: String by project
21+
val projectUrl: String by project
22+
val projectGithubUrl: String by project
23+
val licenseName: String by project
24+
val licenseUrl: String by project
425

526
group = "com.onixbyte"
6-
version = "unspecified"
27+
version = artefactVersion
728

8-
repositories {
9-
mavenCentral()
29+
dependencies {
30+
implementation(project(":devkit-core"))
1031
}
1132

12-
dependencies {
13-
testImplementation(platform("org.junit:junit-bom:5.10.0"))
14-
testImplementation("org.junit.jupiter:junit-jupiter")
33+
java {
34+
sourceCompatibility = JavaVersion.VERSION_17
35+
targetCompatibility = JavaVersion.VERSION_17
36+
withSourcesJar()
37+
withJavadocJar()
1538
}
1639

1740
tasks.test {
1841
useJUnitPlatform()
42+
}
43+
44+
publishing {
45+
publications {
46+
create<MavenPublication>("num4j") {
47+
groupId = group.toString()
48+
artifactId = "num4j"
49+
version = artefactVersion
50+
51+
pom {
52+
name = "Num4j"
53+
description =
54+
"This module is an easy-to-use util for mathematical calculations in Java."
55+
url = projectUrl
56+
57+
licenses {
58+
license {
59+
name = licenseName
60+
url = licenseUrl
61+
}
62+
}
63+
64+
scm {
65+
connection = "scm:git:git://github.com:OnixByte/JDevKit.git"
66+
developerConnection = "scm:git:git://github.com:OnixByte/JDevKit.git"
67+
url = projectGithubUrl
68+
}
69+
70+
developers {
71+
developer {
72+
id = "zihluwang"
73+
name = "Zihlu Wang"
74+
email = "really@zihlu.wang"
75+
timezone = "Asia/Hong_Kong"
76+
}
77+
}
78+
}
79+
80+
from(components["java"])
81+
82+
signing {
83+
sign(publishing.publications["num4j"])
84+
}
85+
}
86+
87+
repositories {
88+
maven {
89+
name = "sonatypeNexus"
90+
url = URI(providers.gradleProperty("repo.maven-central.host").get())
91+
credentials {
92+
username = providers.gradleProperty("repo.maven-central.username").get()
93+
password = providers.gradleProperty("repo.maven-central.password").get()
94+
}
95+
}
96+
}
97+
}
1998
}

property-guard-spring-boot-starter/build.gradle.kts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,16 @@
1717

1818
import java.net.URI
1919

20-
val buildGroupId: String by project
21-
val buildVersion: String by project
20+
val artefactVersion: String by project
2221
val projectUrl: String by project
2322
val projectGithubUrl: String by project
2423
val licenseName: String by project
2524
val licenseUrl: String by project
2625

2726
val springBootVersion: String by project
2827

29-
group = buildGroupId
30-
version = buildVersion
28+
group = "com.onixbyte"
29+
version = artefactVersion
3130

3231
dependencies {
3332
implementation(project(":devkit-utils"))
@@ -51,9 +50,9 @@ tasks.test {
5150
publishing {
5251
publications {
5352
create<MavenPublication>("propertyGuardSpringBootStarter") {
54-
groupId = buildGroupId
53+
groupId = group.toString()
5554
artifactId = "property-guard-spring-boot-starter"
56-
version = buildVersion
55+
version = artefactVersion
5756

5857
pom {
5958
name = "Property Guard Spring Boot Starter"

simple-jwt-authzero/build.gradle.kts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
import java.net.URI
1919

20-
val buildGroupId: String by project
21-
val buildVersion: String by project
20+
val artefactVersion: String by project
2221
val projectUrl: String by project
2322
val projectGithubUrl: String by project
2423
val licenseName: String by project
@@ -27,8 +26,8 @@ val licenseUrl: String by project
2726
val jacksonVersion: String by project
2827
val javaJwtVersion: String by project
2928

30-
group = buildGroupId
31-
version = buildVersion
29+
group = "com.onixbyte"
30+
version = artefactVersion
3231

3332
dependencies {
3433
implementation(project(":devkit-utils"))
@@ -53,9 +52,9 @@ tasks.test {
5352
publishing {
5453
publications {
5554
create<MavenPublication>("simpleJwtAuthzero") {
56-
groupId = buildGroupId
55+
groupId = group.toString()
5756
artifactId = "simple-jwt-authzero"
58-
version = buildVersion
57+
version = artefactVersion
5958

6059
pom {
6160
name = "Simple JWT :: Auth0"

0 commit comments

Comments
 (0)