How to add new sourceset with gradle kotlin-dsl

后端 未结 5 2008
死守一世寂寞
死守一世寂寞 2021-02-07 04:55

I want to add a sourceset src/gen/java. With groovy this is rather easy and already described in https://discuss.gradle.org/t/how-to-use-gradle-with-generated-sourc

5条回答
  •  我寻月下人不归
    2021-02-07 05:19

    I wanted to add a source set with the name "test-integration" and the source directory src/test-integration/kotlin. I was able to accomplish that by combining the two pre-existing answers:

    java.sourceSets.create("test-integration").java {
        srcDir("src/test-integration/kotlin")
    }
    

提交回复
热议问题