Skip to content

Commit bf82c18

Browse files
authored
Merge pull request #44 from synadia-io/pcgroups-subprojects
Converting PCGroups and CLI to root and subproject for easier building
2 parents bfef120 + bd9b7dd commit bf82c18

16 files changed

Lines changed: 149 additions & 669 deletions

File tree

.github/workflows/pcgcli.yml

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
defaults:
1616
run:
17-
working-directory: ./pcgroups-cli
17+
working-directory: ./pcgroups
1818
steps:
1919
- name: Set up JDK
2020
uses: actions/setup-java@v5
@@ -24,36 +24,15 @@ jobs:
2424
- name: Check out code
2525
uses: actions/checkout@v4
2626
- name: Build with Gradle
27-
run: chmod +x gradlew && ./gradlew clean dist
28-
- name: Build with Maven
29-
run: mvn clean package
27+
run: chmod +x gradlew && ./gradlew :pcgroups-cli:clean :pcgroups-cli:dist
3028
- name: Validate artifacts were created
3129
run: |
32-
FILE_PATH="build/cg.jar"
33-
if [ -f "$FILE_PATH" ]; then
34-
echo "Validation successful: $FILE_PATH was created."
35-
else
36-
echo "Validation failed: $FILE_PATH was not found."
37-
exit 1 # Fails the workflow step
38-
fi
39-
FILE_PATH="build/cg.zip"
40-
if [ -f "$FILE_PATH" ]; then
41-
echo "Validation successful: $FILE_PATH was created."
42-
else
43-
echo "Validation failed: $FILE_PATH was not found."
44-
exit 1 # Fails the workflow step
45-
fi
46-
FILE_PATH="build/cg.tar"
47-
if [ -f "$FILE_PATH" ]; then
48-
echo "Validation successful: $FILE_PATH was created."
49-
else
50-
echo "Validation failed: $FILE_PATH was not found."
51-
exit 1 # Fails the workflow step
52-
fi
53-
FILE_PATH="target/cg.jar"
54-
if [ -f "$FILE_PATH" ]; then
55-
echo "Validation successful: $FILE_PATH was created."
56-
else
57-
echo "Validation failed: $FILE_PATH was not found."
58-
exit 1 # Fails the workflow step
59-
fi
30+
CLI_BUILD="../pcgroups-cli/build"
31+
for f in cg.jar cg.zip cg.tar; do
32+
if [ -f "$CLI_BUILD/$f" ]; then
33+
echo "Validation successful: $CLI_BUILD/$f was created."
34+
else
35+
echo "Validation failed: $CLI_BUILD/$f was not found."
36+
exit 1
37+
fi
38+
done

pcgroups-cli/README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ Commands:
6666
```
6767

6868
## Building from Source
69-
The project contains both a Maven pom.xml file and a Gradle project,
70-
and both are configured to build an executable Java jar named `cg.jar`
71-
72-
### Maven
73-
```
74-
mvn clean package
75-
```
76-
77-
will build the `cg.jar` in the `target` folder
7869

7970
### Gradle
8071
```

pcgroups-cli/build.gradle

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,21 @@ plugins {
33
id 'com.github.johnrengelman.shadow' version '8.1.1' // Apply the shadow plugin
44
}
55

6-
version = "0.1.0"
7-
def originalShadow = 'pcg-cli-' + version + '-all.jar'
6+
version = "0.2.0"
7+
def originalShadow = 'pcgroups-cli-' + version + '-all.jar'
88

99
java {
1010
sourceCompatibility = JavaVersion.VERSION_1_8
1111
}
1212

1313
repositories {
1414
mavenCentral()
15-
mavenLocal()
1615
maven { url="https://repo1.maven.org/maven2/" }
1716
maven { url="https://central.sonatype.com/repository/maven-snapshots" }
1817
}
1918

2019
dependencies {
21-
implementation 'io.nats:jnats:2.25.1'
22-
implementation 'org.jspecify:jspecify:1.0.0'
23-
implementation 'io.synadia:pcgroups:0.1.1-SNAPSHOT'
20+
implementation project(':') // ':' means root project which is 'pcgroups'
2421
implementation 'info.picocli:picocli:4.7.5'
2522

2623
testImplementation 'io.nats:jnats-server-runner:3.1.0'

pcgroups-cli/gradle/libs.versions.toml

Lines changed: 0 additions & 12 deletions
This file was deleted.
1.65 KB
Binary file not shown.

pcgroups-cli/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

pcgroups-cli/gradlew

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

0 commit comments

Comments
 (0)