Skip to content

Commit e8caec1

Browse files
committed
chore: sandbox gradle project to test the plugin
1 parent a97916b commit e8caec1

File tree

8 files changed

+749
-27
lines changed

8 files changed

+749
-27
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ $ sdk i java 21.0.4-zulu
1818
$ sdk u java 21.0.4-zulu
1919
```
2020

21-
### Build
21+
### Build & Test
2222

2323
```bash
2424
$ ./gradlew build
25+
26+
# To test, run the sample sandbox project by changing the version in `settings.gradle.kts`
27+
$ ./gradlew publishToMavenLocal
28+
$ ./gradlew -p sandbox :build
2529
```
2630

2731
### Publishing

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ karakum = "1.0.0-alpha.40-K2"
5151
seskar = "3.42.0"
5252
spring-boot = "3.3.3"
5353
spring-depmgmt = "1.1.6"
54-
ktor = "3.0.0-rc-1"
54+
ktor = "3.0.0-rc-2"
5555
ktor-cohort = "2.5.1"
5656
otel = "1.42.1"
5757
otel-instr = "2.8.0"

plugins/src/main/kotlin/plugins/publishing.gradle.kts

-25
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,8 @@ plugins {
1616
if (isRootProject) {
1717
apply(plugin = "io.github.gradle-nexus.publish-plugin")
1818

19-
val nativeBuild: String? by project
20-
val composeBuild: String? by project
21-
val springBoot: String? by project
22-
2319
nmcp {
2420
publishAggregation {
25-
project(":shared")
26-
project(":dep-mgmt:bom")
27-
project(":dep-mgmt:catalog")
28-
project(":meta:ksp:processor")
29-
project(":meta:compiler:plugin")
30-
project(":backend:jvm")
31-
project(":backend:data")
32-
project(":backend:profiling")
33-
project(":backend:security")
34-
project(":web")
35-
if (nativeBuild.toBoolean()) {
36-
project(":backend:native")
37-
}
38-
if (springBoot.toBoolean()) {
39-
project(":backend:boot")
40-
}
41-
if (composeBuild.toBoolean()) {
42-
project(":compose:cmp")
43-
// project(":compose:html")
44-
}
45-
4621
username = mavenCentralUsername
4722
password = mavenCentralPassword
4823
publicationType = "AUTOMATIC"

sandbox/build.gradle.kts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import common.*
2+
3+
plugins {
4+
plugins.root
5+
plugins.kotlin.jvm
6+
id("com.gradleup.shadow")
7+
}
8+
9+
application { mainClass = "MainKt" }

sandbox/gradle.properties

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Gradle
2+
org.gradle.jvmargs=-Xmx2g
3+
org.gradle.parallel=true
4+
org.gradle.caching=true
5+
org.gradle.daemon=true
6+
org.gradle.configureondemand=true
7+
org.gradle.configuration-cache=false
8+
org.gradle.configuration-cache.problems=warn
9+
org.gradle.kotlin.dsl.allWarningsAsErrors=true
10+
org.gradle.unsafe.isolated-projects=false
11+
# org.gradle.logging.stacktrace=all
12+
13+
## Kotlin
14+
kotlin.code.style=official
15+
kotlin.jvm.target.validation.mode=warning
16+
17+
# Project
18+
semver.project.tagPrefix=v
19+
semver.checkClean=false
20+
semver.commitsMaxCount=100
21+
# semver.logOnlyOnRootProject=true

sandbox/gradle/libs.versions.toml

+669
Large diffs are not rendered by default.

sandbox/settings.gradle.kts

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@file:Suppress("UnstableApiUsage")
2+
3+
pluginManagement {
4+
repositories {
5+
gradlePluginPortal()
6+
mavenCentral()
7+
mavenLocal()
8+
}
9+
10+
resolutionStrategy {
11+
eachPlugin {
12+
if (requested.id.id.startsWith("settings.")) {
13+
useModule("dev.suresh.build:plugins:0.5.0")
14+
}
15+
}
16+
}
17+
}
18+
19+
dependencyResolutionManagement {
20+
repositories {
21+
mavenCentral()
22+
gradlePluginPortal()
23+
mavenLocal()
24+
}
25+
repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
26+
27+
versionCatalogs {
28+
create("mylibs") {
29+
from("dev.suresh.build:catalog:0.5.0")
30+
version("java", "21")
31+
}
32+
}
33+
}
34+
35+
plugins { id("settings.repos") }
36+
37+
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
38+
39+
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
40+
41+
rootProject.name = "sandbox"

sandbox/src/main/kotlin/Main.kt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fun main() {
2+
println("Hello, sandbox project!")
3+
}

0 commit comments

Comments
 (0)