File tree Expand file tree Collapse file tree 2 files changed +21
-16
lines changed
Expand file tree Collapse file tree 2 files changed +21
-16
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1- import org.gradle.jvm.tasks.Jar
2-
31plugins {
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+
2525application {
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
5459ktlint {
You can’t perform that action at this time.
0 commit comments