Skip to content

Commit ef8cde2

Browse files
committed
feat: moved devkit-bom inside this project
1 parent f7c809b commit ef8cde2

File tree

15 files changed

+177
-7
lines changed

15 files changed

+177
-7
lines changed

devkit-bom/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# DevKit BOM
2+
3+
The devkit-bom (Bill of Materials) is a Maven POM file provided by OnixByte to manage dependency versions for the DevKit suite of libraries. By incorporating this BOM into your build configuration, you can ensure consistent versioning across all included dependencies without needing to specify versions explicitly in your project files. Published with Gradle metadata, this BOM supports both Maven and Gradle projects, and this document outlines how to integrate and use it effectively in both ecosystems.
4+
5+
## Using in Maven
6+
7+
Add the `devkit-bom` to your `pom.xml` under `<dependencyManagement>`:
8+
9+
```xml
10+
<dependencyManagement>
11+
<dependencies>
12+
<dependency>
13+
<groupId>com.onixbyte</groupId>
14+
<artifactId>devkit-bom</artifactId>
15+
<version>${devkit-version}</version>
16+
<type>pom</type>
17+
<scope>import</scope>
18+
</dependency>
19+
</dependencies>
20+
</dependencyManagement>
21+
```
22+
23+
Then reference dependencies like `devkit-core` without a version.
24+
25+
## Using in Gradle
26+
27+
In your `build.gradle[.kts]`, apply the BOM using the `platform` dependency:
28+
29+
```groovy
30+
dependencies {
31+
implementation platform('com.onixbyte:devkit-bom:2.0.0')
32+
implementation 'com.onixbyte:devkit-core'
33+
implementation 'com.onixbyte:devkit-utils'
34+
}
35+
```
36+
37+
If you are using Kotlin DSL:
38+
39+
```kotlin
40+
dependencies {
41+
implementation(platform("com.onixbyte:devkit-bom:2.0.0"))
42+
implementation("com.onixbyte:devkit-core")
43+
implementation("com.onixbyte:devkit-utils")
44+
}
45+
```
46+

devkit-bom/build.gradle.kts

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/*
2+
* Copyright (C) 2024-2025 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+
import java.net.URI
18+
19+
plugins {
20+
id("java-platform")
21+
id("maven-publish")
22+
id("signing")
23+
}
24+
25+
val artefactVersion: String by project
26+
27+
group = "com.onixbyte"
28+
version = artefactVersion
29+
30+
repositories {
31+
mavenCentral()
32+
}
33+
34+
dependencies {
35+
constraints {
36+
api("com.onixbyte:devkit-core:$artefactVersion")
37+
api("com.onixbyte:devkit-utils:$artefactVersion")
38+
api("com.onixbyte:guid:$artefactVersion")
39+
api("com.onixbyte:key-pair-loader:$artefactVersion")
40+
api("com.onixbyte:map-util-unsafe:$artefactVersion")
41+
api("com.onixbyte:num4j:$artefactVersion")
42+
api("com.onixbyte:simple-jwt-facade:$artefactVersion")
43+
api("com.onixbyte:simple-jwt-authzero:$artefactVersion")
44+
api("com.onixbyte:simple-jwt-spring-boot-starter:$artefactVersion")
45+
api("com.onixbyte:property-guard-spring-boot-starter:$artefactVersion")
46+
api("com.onixbyte:simple-serial-spring-boot-starter:$artefactVersion")
47+
}
48+
}
49+
50+
publishing {
51+
publications {
52+
create<MavenPublication>("devkitBom") {
53+
groupId = group.toString()
54+
artifactId = "devkit-bom"
55+
version = artefactVersion
56+
57+
pom {
58+
name = "DevKit BOM"
59+
description = "Using BOM could use unified OnixByte JDevKit."
60+
url = "https://github.com/OnixByte/devkit-bom"
61+
62+
licenses {
63+
license {
64+
name = "The Apache License, Version 2.0"
65+
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
66+
}
67+
}
68+
69+
scm {
70+
connection = "scm:git:git://github.com:OnixByte/devkit-bom.git"
71+
developerConnection = "scm:git:git://github.com:OnixByte/devkit-bom.git"
72+
url = "https://github.com/OnixByte/devkit-bom"
73+
}
74+
75+
developers {
76+
developer {
77+
id = "zihluwang"
78+
name = "Zihlu Wang"
79+
email = "zihlu.wang@onixbyte.com"
80+
timezone = "Asia/Hong_Kong"
81+
}
82+
}
83+
}
84+
85+
print(components)
86+
87+
from(components["javaPlatform"])
88+
89+
signing {
90+
sign(publishing.publications["devkitBom"])
91+
}
92+
}
93+
94+
repositories {
95+
maven {
96+
name = "sonatypeNexus"
97+
url = URI(providers.gradleProperty("repo.maven-central.host").get())
98+
credentials {
99+
username = providers.gradleProperty("repo.maven-central.username").get()
100+
password = providers.gradleProperty("repo.maven-central.password").get()
101+
}
102+
}
103+
}
104+
}
105+
}

devkit-core/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
import java.net.URI
1718

1819
plugins {
1920
java

devkit-utils/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
import java.net.URI
1718

1819
plugins {
1920
java

gradle.properties

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
# limitations under the License.
1616
#
1717

18+
artefactVersion=2.0.0
19+
projectUrl=https://onixbyte.com/JDevKit
20+
projectGithubUrl=https://github.com/OnixByte/JDevKit
21+
licenseName=The Apache License, Version 2.0
22+
licenseUrl=https://www.apache.org/licenses/LICENSE-2.0.txt
23+
1824
jacksonVersion=2.18.2
1925
javaJwtVersion=4.4.0
2026
junitVersion=5.11.4
2127
logbackVersion=1.5.16
2228
slf4jVersion=2.0.16
2329
springVersion=6.2.2
24-
springBootVersion=3.4.2
25-
26-
artefactVersion=2.0.0
27-
projectUrl=https://onixbyte.com/JDevKit
28-
projectGithubUrl=https://github.com/OnixByte/JDevKit
29-
licenseName=The Apache License, Version 2.0
30-
licenseUrl=https://www.apache.org/licenses/LICENSE-2.0.txt
30+
springBootVersion=3.4.2

guid/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
import java.net.URI
1718

1819
plugins {
1920
java

key-pair-loader/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
import java.net.URI
18+
1719
plugins {
1820
java
1921
id("java-library")

map-util-unsafe/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
import java.net.URI
18+
1719
plugins {
1820
java
1921
id("java-library")

num4j/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
import java.net.URI
18+
1719
plugins {
1820
java
1921
id("java-library")

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
import java.net.URI
18+
1719
plugins {
1820
java
1921
id("java-library")

0 commit comments

Comments
 (0)