From 31564bca34b1e43b6dc4971133957cdbef3774a4 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Sat, 7 Mar 2015 12:18:54 +0100 Subject: [PATCH] Bumped up lib versions, added plugindev plugin --- build.gradle | 61 ++++++++++++++++++++-------------------------------- 1 file changed, 23 insertions(+), 38 deletions(-) diff --git a/build.gradle b/build.gradle index e4b44f7..027808d 100644 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,7 @@ buildscript { if (project.hasProperty('coverage')) { classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:1.0.2' } + classpath 'nu.studer:gradle-plugindev-plugin:1.0.3' } } @@ -16,8 +17,10 @@ apply plugin: 'com.jfrog.bintray' apply plugin: 'com.ofg.uptodate' apply plugin: 'maven-publish' apply plugin: 'groovy' +apply plugin: 'nu.studer.plugindev' sourceCompatibility = 1.7 +targetCompatibility = 1.7 repositories { mavenLocal() @@ -34,13 +37,17 @@ dependencies { } testRuntime 'org.slf4j:slf4j-log4j12:1.7.10' - testRuntime 'cglib:cglib-nodep:2.2.2' - testRuntime 'org.objenesis:objenesis:1.2' - testCompile('com.netflix.nebula:nebula-test:2.0.5') { + testRuntime 'cglib:cglib-nodep:3.1' + testRuntime 'org.objenesis:objenesis:2.1' + testCompile('com.netflix.nebula:nebula-test:2.2.0') { exclude group: 'org.codehaus.groovy', module: 'groovy-all' } } +uptodate { + addExcludedVersionPatterns '^1.*-groovy-2.[3-4]$' +} + sourceSets.main.java.srcDirs = [] sourceSets.main.groovy.srcDirs += ["src/main/java"] @@ -53,47 +60,25 @@ test { bintrayUpload.dependsOn 'build' -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from sourceSets.main.allSource -} - -task javadocJar(type: Jar, dependsOn: groovydoc) { - classifier = 'javadoc' - from groovydoc.destinationDir -} - -artifacts { - archives sourcesJar - archives javadocJar -} - -publishing { - publications { - plugin(MavenPublication) { - from components.java - artifact sourcesJar - artifact javadocJar - } - } +plugindev { + pluginId ='com.blogspot.toomuchcoding.testprofiler' + pluginImplementationClass 'com.blogspot.toomuchcoding.testprofiler.TestProfilerPlugin' + pluginDescription 'Gradle plugin that profiles your tests. Gives you a CSV file sorted by tests execution time.' + pluginLicenses 'Apache-2.0' + pluginTags 'gradle', 'plugin', 'testing' + authorId 'marcingrzejszczak' + authorName 'Marcin Grzejszczak' + authorEmail 'marcin@grzejszczak.pl' + projectUrl 'https://github.com/marcingrzejszczak/gradle-test-profiler' + projectInceptionYear '2015' + done() // do not omit this } bintray { user = project.properties['bintrayUser'] key = project.properties['bintrayKey'] - publications = ['plugin'] - pkg { - repo = 'com-blogspot-toomuchcoding' - name = 'gradle-test-profiler' - desc = 'Gradle plugin that profiles your tests. Gives you a CSV file sorted by tests execution time.' - licenses = ['Apache-2.0'] - labels = ['gradle', 'testing'] - } - version { - attributes = ['gradle-plugin': 'com.blogspot.toomuchcoding.testprofiler:com.blogspot.toomuchcoding:gradle-test-profiler'] - } + pkg.repo = 'com-blogspot-toomuchcoding' } - if (project.hasProperty('coverage')) { apply plugin: 'jacoco' apply plugin: 'com.github.kt3k.coveralls'