icerockdev / shaper

File structure generation tool from templates on Handlebars
Apache License 2.0
12 stars 8 forks source link

Implement Gradle plugin #27

Open Alex009 opened 3 years ago

Alex009 commented 3 years ago

Need to implement gradle plugin, which will be available from gradlePluginPortal - https://plugins.gradle.org/ plugin id dev.icerock.gradle.shaper

plugin should support adding local list of template directories by git or local paths, also should support overriding of any params. plugin should create gradle task shaper. when we run this task gradle should read 2 args of cli - first is template name, second is output directory. also all interactive logic should be used too (filling of params)

configuration sample:

plugins {
    id("dev.icerock.gradle.shaper") version("0.4.0")
}

shaper {
    templates {
        git("https://github.com/icerockdev/shaper-templates.git")
        directory(file("templates"))
    }
    params {
        set("packageName", "dev.icerock.sample")
    }
}

usage sample:

./gradlew shaper kmm-template mpp-library/feature
Alex009 commented 3 years ago

can be helpful - https://github.com/strongself/Generamba/wiki/Rambafile-Structure