Skip to content

Commit 0c2de34

Browse files
Go back to single-root-module layout
This is a single-module project anyway, and keeping layout with single submodule caused some issues.
1 parent 540d882 commit 0c2de34

33 files changed

Lines changed: 21 additions & 39 deletions

.github/copilot-instructions.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
libraries/applications.
99
- **Languages:** Java (main), Kotlin (build scripts).
1010
- **Frameworks/Tools:** Gradle (Kotlin DSL), JUnit Jupiter, AssertJ, Spotless, GitHub Actions CI.
11-
- **Modules:**
12-
- `problem4j-core` - core module of Problem4J set of libraries.
1311
- **Java Version:** Java 8+ (toolchain set to 8, CI builds/tests on JDK 17 due to Gradle 9+ runtime requirements).
1412
- **Repo Size:** Small (core source, tests, build scripts, CI/CD workflows).
1513

@@ -41,12 +39,10 @@
4139

4240
- **Root Files:** `build.gradle.kts`, `settings.gradle.kts`, `README.md`, `RELEASING.md`, `gradlew`, `gradlew.bat`,
4341
`gradle/libs.versions.toml`, `.github/workflows/`.
44-
- **Source Code:** `src/main/java` in each module.
45-
- **Tests:** `src/test/java` in each module.
42+
- **Source Code:** `src/main/java`.
43+
- **Tests:** `src/test/java`.
4644
- **Build Scripts:** All modules have `build.gradle.kts`.
4745
- **Build Utils:** Custom Gradle scripts in `buildSrc`.
48-
- **Module Directories:**
49-
- `problem4j-core`: Problem4J core, framework-agnostic module.
5046

5147
## Coding Guidelines
5248

.github/workflows/gradle-publish-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
run: |
4242
VERSION="${GITHUB_REF_NAME#v}" # removes leading 'v' from tag name
4343
echo "::notice::publishing version $VERSION"
44-
./gradlew -Pversion="$VERSION" -Psign publishAggregationToCentralPortal
44+
./gradlew -Pversion="$VERSION" -Psign publishAllPublicationsToCentralPortal

build.gradle.kts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
import com.diffplug.spotless.LineEnding
22

33
plugins {
4-
id("internal.convention-common")
5-
alias(libs.plugins.nmcp).apply(false)
6-
alias(libs.plugins.nmcp.aggregation)
4+
id("internal.convention-java-library")
5+
id("internal.convention-publishing")
6+
alias(libs.plugins.nmcp)
77
alias(libs.plugins.spotless)
88
}
99

10+
internalPublishing {
11+
displayName = "Problem4J Core"
12+
description = "Core library implementing Problem model according to RFC7807 (aka RFC9457)."
13+
}
14+
1015
dependencies {
11-
nmcpAggregation(project(":problem4j-core"))
16+
testImplementation(platform(libs.junit.bom))
17+
18+
testImplementation(libs.junit.jupiter)
19+
testRuntimeOnly(libs.junit.platform.launcher)
20+
21+
testImplementation(libs.assertj.core)
1222
}
1323

14-
nmcpAggregation {
15-
centralPortal {
24+
nmcp {
25+
publishAllPublicationsToCentralPortal {
1626
username = System.getenv("PUBLISHING_USERNAME")
1727
password = System.getenv("PUBLISHING_PASSWORD")
1828

@@ -40,7 +50,7 @@ spotless {
4050
}
4151

4252
kotlinGradle {
43-
target("*.gradle.kts", "problem4j-*/*.gradle.kts", "buildSrc/*.gradle.kts", "buildSrc/src/**/*.gradle.kts")
53+
target("*.gradle.kts", "buildSrc/*.gradle.kts", "buildSrc/src/**/*.gradle.kts")
4454

4555
ktlint("1.8.0").editorConfigOverride(mapOf("max_line_length" to "120"))
4656
endWithNewline()

gradle/libs.versions.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ spotless = "8.1.0"
66

77
[plugins]
88
nmcp = { id = "com.gradleup.nmcp", version.ref = "nmcp" }
9-
nmcp-aggregation = { id = "com.gradleup.nmcp.aggregation", version.ref = "nmcp" }
109
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
1110

1211
[libraries]

problem4j-core/build.gradle.kts

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

settings.gradle.kts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,4 @@ plugins {
88
id("org.gradle.toolchains.foojay-resolver-convention").version("1.0.0")
99
}
1010

11-
// If rootProject.name matches project.name, it fails to generate output for nmcpZipAggregation task - two modules must
12-
// not have the same name (with root included). That's the reason for rootProject.name not matching repository name.
13-
rootProject.name = "problem4j-core-root"
14-
15-
include(":problem4j-core")
11+
rootProject.name = "problem4j-core"

problem4j-core/src/main/java/io/github/problem4j/core/AbstractProblem.java renamed to src/main/java/io/github/problem4j/core/AbstractProblem.java

File renamed without changes.

problem4j-core/src/main/java/io/github/problem4j/core/AbstractProblemBuilder.java renamed to src/main/java/io/github/problem4j/core/AbstractProblemBuilder.java

File renamed without changes.

problem4j-core/src/main/java/io/github/problem4j/core/AbstractProblemContext.java renamed to src/main/java/io/github/problem4j/core/AbstractProblemContext.java

File renamed without changes.

problem4j-core/src/main/java/io/github/problem4j/core/AbstractProblemMapper.java renamed to src/main/java/io/github/problem4j/core/AbstractProblemMapper.java

File renamed without changes.

0 commit comments

Comments
 (0)