File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 11apply plugin : ' groovy'
22apply plugin : ' maven'
3+ apply plugin : ' maven-publish'
34
45group = ' unquietcode.tools.flapi'
56version = ' 0.0-DEVELOPMENT'
@@ -14,4 +15,34 @@ dependencies {
1415 compile localGroovy()
1516
1617 compile ' unquietcode.tools.flapi:flapi-plugin:0.0-DEVELOPMENT'
18+ }
19+
20+ task sourceJar (type : Jar , dependsOn : classes) {
21+ classifier = " sources"
22+ from sourceSets. main. allJava
23+ }
24+
25+ task javadocJar (type : Jar , dependsOn : javadoc) {
26+ classifier = ' javadoc'
27+ from javadoc. destinationDir
28+ }
29+
30+ def AorB = { String a , String b ->
31+ return a != null && ! a. trim(). isEmpty() ? a : b;
32+ }
33+
34+ publishing {
35+ publications {
36+ mavenJava(MavenPublication ) {
37+ from components. java
38+ artifact sourceJar
39+ artifact javadocJar
40+ }
41+ }
42+
43+ repositories {
44+ maven {
45+ url AorB (System . getProperty(" maven.deploy.repository" ), " $buildDir /repo" )
46+ }
47+ }
1748}
You can’t perform that action at this time.
0 commit comments