Skip to content

Commit

Permalink
Update to latest publishing plugin, dependency lock plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider committed Sep 9, 2015
1 parent 223e07b commit 6ea46ad
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 127 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
3.0.0 / 2015-09-09
==================

* Remove FixJavaPlugin
* Apply new publishing plugins
* Update plugin versions used
* gradle-dependency-lock 2.2.3 -> 3.0.0
* nebula-publishing-plugin 2.2.1 -> 4.0.1

2.2.1 / 2015-04-02
==================

Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ contacts {
}

dependencies {
compile 'com.netflix.nebula:nebula-core:2.2.+'
compile 'com.netflix.nebula:nebula-publishing-plugin:2.2.+'
compile 'com.netflix.nebula:gradle-contacts-plugin:2.2.+'
compile 'com.netflix.nebula:gradle-dependency-lock-plugin:2.2.+'
compile 'com.netflix.nebula:gradle-info-plugin:2.2.+'
compile 'com.netflix.nebula:nebula-core:latest.release'
compile 'com.netflix.nebula:nebula-publishing-plugin:latest.release'
compile 'com.netflix.nebula:gradle-contacts-plugin:latest.release'
compile 'com.netflix.nebula:gradle-dependency-lock-plugin:latest.release'
compile 'com.netflix.nebula:gradle-info-plugin:latest.release'
}

apply from: 'https://raw.githubusercontent.com/nebula-plugins/nebula-core/596569bf3e7bd32da076784a8273dbd145bc016f/common.gradle'
Expand Down
8 changes: 0 additions & 8 deletions dependencies.lock

This file was deleted.

34 changes: 0 additions & 34 deletions src/main/groovy/nebula/plugin/responsible/FixJavaPlugin.groovy

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,28 @@ package nebula.plugin.responsible
import nebula.plugin.contacts.ContactsPlugin
import nebula.plugin.dependencylock.DependencyLockPlugin
import nebula.plugin.info.InfoPlugin
import nebula.plugin.publishing.NebulaJavadocJarPlugin
import nebula.plugin.publishing.NebulaPublishingPlugin
import nebula.plugin.publishing.NebulaSourceJarPlugin
import nebula.plugin.publishing.NebulaTestJarPlugin
import nebula.plugin.publishing.sign.NebulaSignPlugin
import nebula.plugin.publishing.maven.MavenPublishPlugin
import nebula.plugin.publishing.publications.JavadocJarPlugin
import nebula.plugin.publishing.publications.SourceJarPlugin
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.logging.Logger
import org.gradle.api.logging.Logging
import org.gradle.api.tasks.javadoc.Javadoc
import org.gradle.api.tasks.testing.Test

/**
* Provide a responsible environment for a Gradle plugin.
*/
class NebulaResponsiblePlugin implements Plugin<Project> {
private static Logger logger = Logging.getLogger(NebulaResponsiblePlugin);

protected Project project

@Override
void apply(Project project) {
this.project = project

project.plugins.apply(FixJavaPlugin)

// Publishing
project.plugins.apply(NebulaPublishingPlugin)
project.plugins.apply(NebulaSignPlugin)
project.plugins.apply(NebulaJavadocJarPlugin)
project.plugins.apply(NebulaSourceJarPlugin)
project.plugins.apply(MavenPublishPlugin)
project.plugins.apply(JavadocJarPlugin)
project.plugins.apply(SourceJarPlugin)

// Info
project.plugins.apply(InfoPlugin)
Expand Down
14 changes: 0 additions & 14 deletions src/test/groovy/nebula/plugin/responsible/FixJavaPluginSpec.groovy

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class NebulaFacetPluginLauncherSpec extends IntegrationSpec {

buildFile << """
apply plugin: 'java'
${applyPlugin(NebulaIntegTestPlugin)}
${applyPlugin(NebulaFacetPlugin)}
facets {
example
}
""".stripIndent()
"""

when:
def result = runTasksSuccessfully( 'build' )
Expand All @@ -21,29 +21,29 @@ class NebulaFacetPluginLauncherSpec extends IntegrationSpec {
result.wasExecuted(':exampleClasses')
}

def "Configures Idea project files for a custom test facet"() {
def "configures Idea project files for a custom test facet"() {
when:
MavenRepoFixture mavenRepoFixture = new MavenRepoFixture(new File(projectDir, 'build'))
mavenRepoFixture.generateMavenRepoDependencies(['foo:bar:2.4', 'custom:baz:5.1.27'])

buildFile << """
apply plugin: 'java'
${applyPlugin(NebulaFacetPlugin)}
apply plugin: 'idea'
apply plugin: 'java'
${applyPlugin(NebulaFacetPlugin)}
apply plugin: 'idea'
facets {
functionalTest
}
facets {
functionalTest
}
repositories {
maven { url '$mavenRepoFixture.mavenRepoDir.canonicalPath' }
}
repositories {
maven { url '$mavenRepoFixture.mavenRepoDir.canonicalPath' }
}
dependencies {
functionalTestCompile 'foo:bar:2.4'
functionalTestRuntime 'custom:baz:5.1.27'
}
"""
dependencies {
functionalTestCompile 'foo:bar:2.4'
functionalTestRuntime 'custom:baz:5.1.27'
}
"""

writeHelloWorld('nebula.plugin.plugin')
writeTest('src/functionalTest/java/', 'nebula.plugin.plugin', false)
Expand All @@ -61,29 +61,29 @@ dependencies {
orderEntries.find { it.library.CLASSES.root.@url.text().contains('baz-5.1.27.jar') }
}

def "Configures Idea project files for a custom facet"() {
def "configures Idea project files for a custom facet"() {
when:
MavenRepoFixture mavenRepoFixture = new MavenRepoFixture(new File(projectDir, 'build'))
mavenRepoFixture.generateMavenRepoDependencies(['foo:bar:2.4', 'custom:baz:5.1.27'])

buildFile << """
apply plugin: 'java'
${applyPlugin(NebulaFacetPlugin)}
apply plugin: 'idea'
apply plugin: 'java'
${applyPlugin(NebulaFacetPlugin)}
apply plugin: 'idea'
facets {
myCustom
}
facets {
myCustom
}
repositories {
maven { url '$mavenRepoFixture.mavenRepoDir.canonicalPath' }
}
repositories {
maven { url '$mavenRepoFixture.mavenRepoDir.canonicalPath' }
}
dependencies {
myCustomCompile 'foo:bar:2.4'
myCustomRuntime 'custom:baz:5.1.27'
}
"""
dependencies {
myCustomCompile 'foo:bar:2.4'
myCustomRuntime 'custom:baz:5.1.27'
}
"""

writeHelloWorld('nebula.plugin.plugin')
writeTest('src/myCustom/java/', 'nebula.plugin.plugin', false)
Expand All @@ -101,7 +101,7 @@ dependencies {
orderEntries.find { it.library.CLASSES.root.@url.text().contains('baz-5.1.27.jar') }
}

def 'Configures Idea project before java plugin'() {
def 'configures Idea project before java plugin'() {
when:
MavenRepoFixture mavenRepoFixture = new MavenRepoFixture(new File(projectDir, 'build'))
mavenRepoFixture.generateMavenRepoDependencies(['foo:bar:2.4', 'custom:baz:5.1.27'])
Expand All @@ -124,7 +124,7 @@ dependencies {
myCustomCompile 'foo:bar:2.4'
myCustomRuntime 'custom:baz:5.1.27'
}
""".stripIndent()
"""

runTasksSuccessfully('idea')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class NebulaFacetPluginSpec extends PluginProjectSpec {

def 'do nothing without Java plugin'() {
when:
project.apply plugin: NebulaFacetPlugin
project.apply plugin: NebulaFacetPlugin.class
project.facets {
integTest
}
Expand All @@ -22,7 +22,7 @@ class NebulaFacetPluginSpec extends PluginProjectSpec {
def 'create functional source set'() {
when:
project.apply plugin: 'java'
project.apply plugin: NebulaFacetPlugin
project.apply plugin: NebulaFacetPlugin.class
project.facets {
integTest
}
Expand All @@ -48,7 +48,7 @@ class NebulaFacetPluginSpec extends PluginProjectSpec {
def 'create multiple source sets'() {
when:
project.apply plugin: 'java'
project.apply plugin: NebulaFacetPlugin
project.apply plugin: NebulaFacetPlugin.class
project.facets {
examples
samples
Expand All @@ -60,7 +60,7 @@ class NebulaFacetPluginSpec extends PluginProjectSpec {

def 'can run without sourcesets'() {
when:
project.apply plugin: NebulaFacetPlugin
project.apply plugin: NebulaFacetPlugin.class
project.apply plugin: 'java-base'
project.facets {
examples
Expand All @@ -80,7 +80,7 @@ class NebulaFacetPluginSpec extends PluginProjectSpec {
def 'configure facets'() {
when:
project.apply plugin: 'java'
project.apply plugin: NebulaFacetPlugin
project.apply plugin: NebulaFacetPlugin.class
project.facets {
examples {
parentSourceSet = 'test'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class NebulaIntegTestPluginLauncherSpec extends IntegrationSpec {
writeResource( 'src/integTest/resources', 'integTest' )
buildFile << """
apply plugin: 'java'
${applyPlugin(NebulaIntegTestPlugin)}
${applyPlugin(NebulaIntegTestPlugin.class)}
repositories {
mavenCentral()
Expand All @@ -24,8 +24,7 @@ class NebulaIntegTestPluginLauncherSpec extends IntegrationSpec {
dependencies {
testCompile 'junit:junit-dep:latest.release'
}
""".stripIndent()
"""
}

def "compiles integration test classes"() {
Expand Down Expand Up @@ -75,17 +74,17 @@ class NebulaIntegTestPluginLauncherSpec extends IntegrationSpec {
mavenRepoFixture.generateMavenRepoDependencies(['foo:bar:2.4', 'custom:baz:5.1.27'])

buildFile << """
apply plugin: 'idea'
apply plugin: 'idea'
repositories {
maven { url '$mavenRepoFixture.mavenRepoDir.canonicalPath' }
}
repositories {
maven { url '$mavenRepoFixture.mavenRepoDir.canonicalPath' }
}
dependencies {
integTestCompile 'foo:bar:2.4'
integTestRuntime 'custom:baz:5.1.27'
}
"""
dependencies {
integTestCompile 'foo:bar:2.4'
integTestRuntime 'custom:baz:5.1.27'
}
"""

writeHelloWorld('nebula.plugin.plugin')
writeTest("src/$NebulaIntegTestPlugin.FACET_NAME/java/", 'nebula.plugin.plugin', false)
Expand Down

0 comments on commit 6ea46ad

Please sign in to comment.