java - Overriding Gradle Settings with Defaults -
i'm working on codebase many ant style projects root project , many sub projects.
in root project build.gradle file declare following settings allow gradle use ant structure:
subprojects { sourcesets { main { java.srcdirs = files('src') resources.srcdirs = files('config') } test { java.srcdirs = files('test/unit') resources.srcdirs = files('test/unit') } } }
i want convert sub projects on maven structure 1 one, way can think stick following in each subprojects build.gradle:
sourcesets { main { java.srcdirs = files('src/main/java') resources.srcdirs = files('src/main/resources') } test { java.srcdirs = files('src/test/java') resources.srcdirs = files('src/main/resources') } }
which seems bit overkill. there easier way default sourcesets default maven style in individual subproject without above?
the other option exclude migrated projects configuration.
configure(subprojects - project(':mavenproject')) { // configure ant source sets }
Comments
Post a Comment