Skip to content

Commit 83e14bb

Browse files
committed
build: Add common package to deployed artifacts
1 parent d71625e commit 83e14bb

File tree

2 files changed

+60
-6
lines changed

2 files changed

+60
-6
lines changed

common/build.gradle

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,71 @@
1+
plugins {
2+
id 'ru.vyarus.animalsniffer' version '1.3.0'
3+
}
4+
5+
defaultTasks 'clean'
6+
7+
apply from: '../utils.gradle'
18
import org.apache.tools.ant.filters.*
29

3-
apply plugin: 'checkstyle'
410
apply plugin: 'java'
11+
apply plugin: 'ru.vyarus.animalsniffer'
12+
apply plugin: 'maven'
13+
apply plugin: 'signing'
14+
apply plugin: 'checkstyle'
15+
apply plugin: 'eclipse'
516

6-
checkstyle {
7-
configFile = rootProject.file('checkstyle.xml')
8-
ignoreFailures = false
17+
project.tasks.assemble.dependsOn project.tasks.shadowJar
18+
19+
task javadocJar(type: Jar) {
20+
classifier = 'javadoc'
21+
from javadoc
22+
}
23+
24+
task sourcesJar(type: Jar) {
25+
classifier = 'sources'
26+
from sourceSets.main.allSource
927
}
1028

1129
repositories {
12-
mavenCentral()
30+
maven { url = "http://repo.maven.apache.org/maven2" }
31+
}
32+
33+
artifacts {
34+
archives sourcesJar
35+
archives javadocJar
36+
}
37+
38+
signing {
39+
sign configurations.archives
40+
}
41+
42+
signArchives {
43+
onlyIf { Task task ->
44+
def shouldExec = false
45+
for (myArg in project.gradle.startParameter.taskRequests[0].args) {
46+
if (myArg.toLowerCase().contains('signjars') || myArg.toLowerCase().contains('uploadarchives')) {
47+
shouldExec = true
48+
}
49+
}
50+
return shouldExec
51+
}
52+
}
53+
54+
checkstyle {
55+
configFile = rootProject.file('checkstyle.xml')
56+
ignoreFailures = false
1357
}
1458

1559
dependencies {
1660
compile 'com.ibm.cloud:sdk-core:3.0.2'
61+
signature 'org.codehaus.mojo.signature:java17:1.0@signature'
1762
}
1863

1964
processResources {
20-
filter ReplaceTokens, tokens: ["pom.version": project.version]
65+
filter ReplaceTokens, tokens: [
66+
"pom.version": project.version,
67+
"build.date" : getDate()
68+
]
2169
}
70+
71+
apply from: rootProject.file('.utility/bintray-properties.gradle')

common/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PACKAGE_NAME=com.ibm.watson:common
2+
ARTIFACT_ID=common
3+
NAME=IBM Watson Java SDK - Common
4+
DESCRIPTION=Classes common to the rest of the wrapper libraries in the Watson Java SDK

0 commit comments

Comments
 (0)