Skip to content

Commit

Permalink
Exclude all test projects when running install or publishing tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangkun83 committed Jul 30, 2015
1 parent 3b5c0d3 commit 01808d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ rootProject.name = 'protobuf-gradle-plugin'
// We have to exclude them when we intend to build the plugin, because the test
// projects apply the plugin at evaluation time. At evaluation time the plugin
// has not been compiled yet.
if ('install' in gradle.startParameter.taskNames) {
if (gradle.startParameter.taskNames.intersect(['install', 'uploadArchives', 'publishPlugins'])) {
if (gradle.startParameter.taskNames.size > 1) {
throw new GradleException("'install' can only be used alone")
throw new GradleException("'install', 'uploadArchives' or 'publishPlugins' can only be used alone")
}
} else {
logger.warn('***************************************************************************')
Expand Down

0 comments on commit 01808d5

Please sign in to comment.