Skip to content

Commit

Permalink
chore: extract publish-plugin into it's own gradle file
Browse files Browse the repository at this point in the history
  • Loading branch information
tschulte committed Sep 21, 2015
1 parent da0a4b5 commit 98025b3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apply plugin: 'com.github.ben-manes.versions'
apply from: 'gradle/credentials.gradle'
apply from: 'gradle/compile.gradle'
apply from: 'gradle/publishing.gradle'
apply from: 'gradle/publish-plugin.gradle'
apply from: 'gradle/bintray.gradle'
apply from: 'gradle/artifactory.gradle'
apply from: 'gradle/code-quality.gradle'
Expand Down Expand Up @@ -32,8 +33,8 @@ apply from: 'compile-dependencies.gradle'

dependencies {
testCompile 'com.netflix.nebula:nebula-test:2.2.2', {
exclude module: 'groovy-all'
}
exclude module: 'groovy-all'
}
}

// workaround for tests to run (see http://stackoverflow.com/questions/29377544/my-gradle-project-depends-on-commons-io-2-4-but-gradle-puts-gradle-home-common)
Expand All @@ -43,10 +44,10 @@ sourceSets {
}
}

group='de.gliderpilot.gradle.semantic-release'
group = 'de.gliderpilot.gradle.semantic-release'

semanticRelease {
changeLogService.ghToken = ghToken
changeLog.ghToken = project.ext.ghToken
}

task integTest {
Expand Down
21 changes: 21 additions & 0 deletions gradle/publish-plugin.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apply plugin: 'com.gradle.plugin-publish'

pluginBundle {
website = 'https://github.com/tschulte/gradle-semantic-release-plugin'
vcsUrl = 'https://github.com/tschulte/gradle-semantic-release-plugin'
description = 'At its core semantic-release is a set of conventions that gives you entirely automated, semver-compliant package publishing.'
tags = ['semver', 'release', 'semantic-release']

plugins {
semanticReleasePlugin {
id = 'de.gliderpilot.semantic-release'
displayName = 'semantic-release'
}
}
}

tasks.publishPlugins {
onlyIf {
!project.version.toString().endsWith('-SNAPSHOT')
}
}
21 changes: 0 additions & 21 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// configuration of the Maven artifacts
apply plugin: 'maven-publish'
apply plugin: 'com.gradle.plugin-publish'

import java.text.SimpleDateFormat
Date buildTimeAndDate = new Date()
Expand Down Expand Up @@ -80,23 +79,3 @@ publishing {
}
}
}

pluginBundle {
website = 'https://github.com/tschulte/gradle-semantic-release-plugin'
vcsUrl = 'https://github.com/tschulte/gradle-semantic-release-plugin'
description = 'At its core semantic-release is a set of conventions that gives you entirely automated, semver-compliant package publishing.'
tags = ['semver', 'release', 'semantic-release']

plugins {
semanticReleasePlugin {
id = 'de.gliderpilot.semantic-release'
displayName = 'semantic-release'
}
}
}

tasks.publishPlugins {
onlyIf {
!project.version.toString().endsWith('-SNAPSHOT')
}
}

0 comments on commit 98025b3

Please sign in to comment.