kordamp / kordamp-gradle-plugins

A collection of Gradle plugins
https://kordamp.org/kordamp-gradle-plugins/
Apache License 2.0
138 stars 25 forks source link

[Licensing] excludedSourceSets can't be set #502

Closed choweiyuan closed 2 years ago

choweiyuan commented 2 years ago
config {
  licensing {
   excludedSourceSets = ["**test**"]
    licenses {
      license {
        id = 'Apache-2.0'
      }
    }
  }
}

I have a simple config above and got the following error:

Using Gradle 7.2

aalmiray commented 2 years ago

Which version of Kordamp was used?

choweiyuan commented 2 years ago

0.47.0

aalmiray commented 2 years ago

You can invoke the excludeSourceSet() method

https://github.com/kordamp/kordamp-gradle-plugins/blob/e744cb7197e8ae0d9cc66c4b064f50776f08723d/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/base/plugins/Licensing.groovy#L95-L99

or add to the property directly such as

config {
  licensing {
    excludedSourceSets.addAll(["**test**"])
    licenses {
      license {
        id = 'Apache-2.0'
      }
    }
  }
}
choweiyuan commented 2 years ago

I used the following and it worked, thank you! excludedSourceSets.addAll(["**test**"])