Assuming that :import
project contains only resources and is not also a java project, here’s how I’d do it (note I’m using 'default'
instead of default
because it’s a keyword in java/groovy). I reckon that intellij might be happier with this approach too
project(':import') {
configurations.create('default')
task zip(type: Zip) {
from 'src/main/resources'
archiveName 'import.zip'
}
task jar(type: Jar) {
dependsOn zip
from zip.archivePath
}
artifacts.add('default', jar)
}
project(':spring-boot') {
dependencies {
compile project(':import') // references the 'default' configuration from the import project
}
}