Skip to content

Commit 267cb23

Browse files
authored
Renamed the generated binary from cli to cag. (#27)
1 parent 94ce7a6 commit 267cb23

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ Helps generate Android Clean Architecture code from the terminal.
3232

3333
```bash
3434
./gradlew :cli:installDist
35-
"./cli/build/install/cli/bin/cli" --new-feature --name=MyFeature
36-
"./cli/build/install/cli/bin/cli" --new-view-model --name=MyViewModel
35+
"./cli/build/install/cag/bin/cag" --new-feature --name=MyFeature
36+
"./cli/build/install/cag/bin/cag" --new-view-model --name=MyViewModel
3737
```
3838

3939
- **Run the fat jar:**
4040

4141
```bash
4242
./gradlew :cli:shadowJar
43-
java -jar "cli/build/libs/cli-all.jar" --new-feature --name=MyFeature
44-
java -jar "cli/build/libs/cli-all.jar" --new-view-model --name=MyViewModel
43+
java -jar "cli/build/libs/cag-[version]-all.jar" --new-feature --name=MyFeature
44+
java -jar "cli/build/libs/cag-[version]-all.jar" --new-view-model --name=MyViewModel
4545
```
4646

4747
#### Usage and help

cli/build.gradle.kts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import org.gradle.jvm.tasks.Jar
2-
31
plugins {
42
alias(libs.plugins.kotlin.jvm)
53
id("application")
@@ -22,7 +20,10 @@ dependencies {
2220
testImplementation(libs.junit4)
2321
}
2422

23+
var terminalCommand = "cag"
24+
2525
application {
26+
applicationName = terminalCommand
2627
mainClass.set("com.mitteloupe.cag.cli.MainKt")
2728
}
2829

@@ -37,18 +38,22 @@ kotlin {
3738
}
3839
}
3940

40-
tasks.withType<Jar> {
41-
manifest {
42-
attributes(
43-
"Implementation-Title" to project.name,
44-
"Implementation-Version" to project.version
45-
)
41+
tasks {
42+
jar {
43+
manifest {
44+
attributes(
45+
"Implementation-Title" to project.name,
46+
"Implementation-Version" to project.version
47+
)
48+
}
49+
archiveBaseName.set(terminalCommand)
4650
}
47-
}
4851

49-
tasks.shadowJar {
50-
archiveClassifier.set("all")
51-
mergeServiceFiles()
52+
shadowJar {
53+
archiveBaseName.set(terminalCommand)
54+
archiveClassifier.set("all")
55+
mergeServiceFiles()
56+
}
5257
}
5358

5459
ktlint {

0 commit comments

Comments
 (0)