Skip to content

Commit bbfaabe

Browse files
committed
chore: fix sandbox tests
1 parent e8caec1 commit bbfaabe

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,27 @@ $ sdk i java 21.0.4-zulu
1818
$ sdk u java 21.0.4-zulu
1919
```
2020

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

23-
```bash
24-
$ ./gradlew build
23+
```bash
24+
$ ./gradlew build
25+
```
2526

26-
# To test, run the sample sandbox project by changing the version in `settings.gradle.kts`
27-
$ ./gradlew publishToMavenLocal
28-
$ ./gradlew -p sandbox :build
29-
```
27+
For testing, a separate [sandbox project](/sandbox) is available with the plugin applied in `settings.gradle.kts`.
28+
First publish the plugin to the local maven repository and then run the sandbox project by setting the `test.version` in
29+
sandbox [gradle.properties](/sandbox/gradle.properties).
30+
31+
```bash
32+
$ ./gradlew publishToMavenLocal
33+
# Set the test.version in sandbox/gradle.properties
34+
$ ./gradlew -p sandbox :build
35+
$ ./gradlew -p sandbox :dependencyUpdates
36+
```
3037

3138
### Publishing
3239

33-
Push a new tag to trigger the [release](https://repo1.maven.org/maven2/dev/suresh/build/) workflow.
40+
Push a new tag to trigger the release workflow and publish the plugin
41+
to [maven central](https://repo1.maven.org/maven2/dev/suresh/build/). That's it!
3442

3543
```bash
3644
$ git tag -am "v1.0.0 release" v1.0.0

sandbox/gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ kotlin.jvm.target.validation.mode=warning
1818
semver.project.tagPrefix=v
1919
semver.checkClean=false
2020
semver.commitsMaxCount=100
21-
# semver.logOnlyOnRootProject=true
21+
# semver.logOnlyOnRootProject=true
22+
23+
# Sandbox Testing
24+
test.version=0.5.0

sandbox/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kotlin = "2.1.0-Beta1"
44
kotlin-ksp = "2.1.0-Beta1-1.0.25"
55
kotlin-jvmtarget = "21"
66
kotlin-dsl-jvmtarget = "21"
7-
kotlin-api-version = "2.1"
7+
kotlin-api-version = "1.9"
88
kotlin-lang-version = "2.1"
99
gradle = "8.10.2"
1010
java-vendor = "Oracle"

sandbox/settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pluginManagement {
1010
resolutionStrategy {
1111
eachPlugin {
1212
if (requested.id.id.startsWith("settings.")) {
13-
useModule("dev.suresh.build:plugins:0.5.0")
13+
useModule("dev.suresh.build:plugins:${extra["test.version"]}")
1414
}
1515
}
1616
}
@@ -26,7 +26,7 @@ dependencyResolutionManagement {
2626

2727
versionCatalogs {
2828
create("mylibs") {
29-
from("dev.suresh.build:catalog:0.5.0")
29+
from("dev.suresh.build:catalog:${extra["test.version"]}")
3030
version("java", "21")
3131
}
3232
}

0 commit comments

Comments
 (0)