gmatyszczak / screen-generator-plugin

Apache License 2.0
147 stars 28 forks source link

Sub Package Support #11

Closed adarzulfu closed 3 years ago

adarzulfu commented 4 years ago

Really greate work! Thank you

I was wondering if it is possible to auto create sub package under selected package for MVVM. For example I have 3 main package "data - domain - presentation" under my main module named "sample". So If i select the main module package (com.sample) to create templated files it should create these files under appropriate package;

-com
  -sample
    -data
         -source
            -other_feature_1
            -other_feature_2
            -other_feature_3
            -new_feature
                *NewFeatureDataSource
    -domain
        -interactor
           -other_feature_1
           -other_feature_2
           -other_feature_3
           -new_feature
             *NewFeatureInteractor
    -presentation
          -other_feature_1
          -other_feature_2
          -other_feature_3
          -new_feature
            *NewFeatureFragment
            *NewFeatureViewModel

Basically, my question is that the generator currently create all files to the selected package. How to create new package and move some generated file to it (fragment, viewmodel etc.)

gmatyszczak commented 4 years ago

Hi @adarzulfu, for now it's not possible. But I will mark it as enhancement to add in the future :)

gmatyszczak commented 3 years ago

It took a while but requested feature was officially added to v1.2.0 :)

There are couple more features like multiple categories, custom variables for each category, related android component, subdirectory and source set for each screen element.

JuanchiFraga commented 2 years ago

@gmatyszczak how can i use this feature on 1.2.0? I trying something like this but the subpackage would not created. See what happend on the second image. image image

gmatyszczak commented 2 years ago

@JuanchiFraga Use / in subdirectory, e.g. presentation/viewmodel

JuanchiFraga commented 2 years ago

@gmatyszczak I still can't get it to work :( image image

JuanchiFraga commented 2 years ago

I would like to do something like that image