$ gradle -q --console=plain lazybones --args='create gradle-kotlin-lib 1.4.1 foobar'
Creating project from template gradle-kotlin-lib 1.4.1 in 'foobar'
Press ^C at any time to quit.
[Maven artifact]
name: (foobar)
group: (org.example)
version: (0.1)
[GitHub repository]
owner: (ohtomi)
name: (foobar)
[Kotlin]
version: (1.2.30)
application? (no) [yes/no]
[Gradle plugin]
dokka version: (0.9.17)
ktlint version: (0.24.0)
io.gitlab.arturbosch.detekt version: (1.0.0.RC7-3)
com.github.ben-manes.versions version: (0.20.0)
net.ossindex.audit version: (0.3.19-beta)
com.jfrog.bintray version: (1.8.3)
# foobar
## Description
TODO
## Usage
TODO
## Contributing
1. Fork it!
1. Create your feature branch: `git checkout -b my-new-feature`
1. Commit your changes: `git commit -am 'Add some feature'`
1. Push to the branch: `git push origin my-new-feature`
1. Submit a pull request :D
## License
[MIT](https://ohtomi.mit-license.org)
Project created in foobar!
$ ls -lR foobar
total 32
-rw-r--r-- 1 ohtomi wheel 336 11 28 21:58 README.md
-rw-r--r-- 1 ohtomi wheel 4714 11 28 21:58 build.gradle.kts
-rw-r--r-- 1 ohtomi wheel 69 11 28 21:58 gradle.properties
drwxr-xr-x 4 ohtomi wheel 128 11 28 21:58 src
foobar/src:
total 0
drwxr-xr-x 4 ohtomi wheel 128 11 28 21:58 main
drwxr-xr-x 4 ohtomi wheel 128 11 28 21:58 test
foobar/src/main:
total 0
drwxr-xr-x 2 ohtomi wheel 64 11 28 21:58 kotlin
drwxr-xr-x 2 ohtomi wheel 64 11 28 21:58 resources
foobar/src/main/kotlin:
foobar/src/main/resources:
foobar/src/test:
total 0
drwxr-xr-x 2 ohtomi wheel 64 11 28 21:58 kotlin
drwxr-xr-x 2 ohtomi wheel 64 11 28 21:58 resources
foobar/src/test/kotlin:
foobar/src/test/resources:
Last active
November 28, 2018 13:00
-
-
Save ohtomi/fc4911dca5d9ef1f51232aefe541e5a1 to your computer and use it in GitHub Desktop.
Gradle initialization scripts to run lazybones
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.tools.ant.types.Commandline | |
import org.gradle.api.tasks.options.Option | |
import java.util.Arrays | |
apply plugin: LazybonesPlugin | |
class LazybonesPlugin implements Plugin<Gradle> { | |
void apply(Gradle gradle) { | |
gradle.allprojects { project -> | |
project.repositories { | |
jcenter() | |
maven { url 'https://dl.bintray.com/bulwark/maven' } | |
} | |
project.configurations { | |
lazybones | |
} | |
project.dependencies { | |
lazybones 'lazybones:lazybones-app:0.8.3' | |
} | |
project.tasks.create('lazybones', JavaExec) { | |
group 'Lazybones' | |
description 'Run lazybones' | |
classpath project.configurations.lazybones | |
main 'uk.co.cacoethes.lazybones.LazybonesMain' | |
standardInput System.in | |
} | |
} | |
} | |
} | |
class LazybonesRunner extends JavaExec { | |
@Option(option = 'args', description = 'Command line arguments passed to the main class. [INCUBATING]') | |
JavaExec setArgsString(String args) { | |
return setArgs(Arrays.asList(Commandline.translateCommandline(args))) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment