简体   繁体   中英

why new sourceset resources not in buildDir in gradle

I have declared

        sourceSets {
            micro {
                resources.srcDir file('src/micro/resources')
            }
        }

but

micro/resources

not copied to ${ buildDir }/ resources / micro .

I want to add micro sourceSet to classpath. Thereby I can run from eclipse or from gradleConsole. What am I missing here?

It looks like you might not be using the correct syntax: How do I add a new sourceset to Gradle? Maybe you could try like this:

sourceSets {
  micro{
    resources {
      srcDir 'src/micro/resources'
    }
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM