Skip to content

Commit

Permalink
⚡ Apply nexus plugin only in root project
Browse files Browse the repository at this point in the history
  • Loading branch information
tony19 committed Apr 8, 2016
1 parent 6d91e69 commit 97b0186
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
16 changes: 8 additions & 8 deletions build.gradle
Expand Up @@ -16,6 +16,9 @@ plugins {
id 'net.researchgate.release' version '2.3.4'
}

apply plugin: 'io.codearte.nexus-staging' // must be in root project
apply from: 'gradle/readme.gradle'

// expose FileUtils to imported Gradle scripts
project.ext.FileUtils = org.apache.commons.io.FileUtils

Expand All @@ -27,9 +30,12 @@ release {
}

allprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'nebula.provided-base'
apply plugin: 'nebula.optional-base'
apply from: "${rootProject.projectDir}/gradle/nexus.gradle"
apply from: "${rootProject.projectDir}/gradle/docs.gradle"

group = 'com.github.tony19'
version = "${version}"
Expand All @@ -38,9 +44,8 @@ allprojects {
}

subprojects {
apply plugin: 'java'
apply from: '../gradle/analysis.gradle'
apply from: '../gradle/license.gradle'
apply from: "${rootProject.projectDir}/gradle/analysis.gradle"
apply from: "${rootProject.projectDir}/gradle/license.gradle"

sourceCompatibility = 1.5
targetCompatibility = 1.5
Expand Down Expand Up @@ -82,8 +87,3 @@ subprojects {
options.deprecation = true
}
}

apply plugin: 'java'
apply from: 'gradle/nexus.gradle'
apply from: 'gradle/readme.gradle'
apply from: 'gradle/docs.gradle'
3 changes: 2 additions & 1 deletion gradle/nexus.gradle
Expand Up @@ -4,8 +4,9 @@
* invoked with `gradle uploadArchives`.
*/

// This plugin must be declared in all projects with artifacts
// in order for them to be uploaded to Nexus.
apply plugin: 'com.bmuschko.nexus'
apply plugin: 'io.codearte.nexus-staging'

modifyPom {
project {
Expand Down

0 comments on commit 97b0186

Please sign in to comment.