Skip to content

Commit cb9983f

Browse files
author
tomerc
committed
updated gradle files for buildinfo
1 parent 2db0ce4 commit cb9983f

File tree

2 files changed

+50
-31
lines changed

2 files changed

+50
-31
lines changed

build.gradle

+49-31
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,73 @@
1-
usePlugin('java')
2-
usePlugin('maven')
3-
1+
apply id: 'java'
42
group = 'org.jfrog.buildinfo'
53
version = '1.1-SNAPSHOT'
64

75
/*
86
(5) Define the Maven attributes that will be used for POM auto-generation
97
*/
10-
def artifactId = projectDir.name
8+
def artifactId = 'buildinfo'
119
def groupId = group
1210
def versionNumber = version
1311

14-
dependencies {
15-
compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.3.1'
16-
compile group: 'com.google.collections', name: 'google-collections', version: '1.0-rc5'
12+
13+
subprojects {
14+
apply id: 'java'
15+
apply id: 'maven'
16+
apply url: 'http://gradle.artifactoryonline.com/gradle/plugins-releases-local/artifactoryplugin/artifactoryplugin/0.3/artifactoryplugin-0.3.gradle'
17+
18+
dependencies {
19+
compile group: 'commons-lang', name: 'commons-lang', version: '2.4'
20+
compile group: 'commons-logging', name: 'commons-logging', version: '1.1.1'
21+
testCompile group: 'org.testng', name: 'testng', version: '5.11', classifier: 'jdk15'
22+
}
1723
}
1824

19-
/*
20-
(1) Define an Artifactory virtual repository used for dependency resolution
21-
*/
22-
repositories {
23-
/*
24-
(2) An optional login/password (will is kept in gradle.properties) and used to authenticate a reader to Artifactory.
25-
USER, PASSWORD and REALM are coming from gradle.properties
26-
Uncomment if anonymous access is not allowed.
27-
*/
28-
//org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials(REALM, HOST, USER, PASSWORD);
29-
mavenRepo urls: "http://localhost:8080/artifactory/libs-releases";
25+
project(':build-info-api') {
26+
dependencies {
27+
compile group: 'commons-codec', name: 'commons-codec', version: '1.3'
28+
compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.3.1'
29+
compile group: 'com.google.collections', name: 'google-collections', version: '1.0'
30+
}
31+
}
32+
33+
project(':build-info-client') {
34+
dependencies {
35+
compile project(':build-info-api')
36+
compile group: 'org.codehaus.jackson', name: 'jackson-mapper-asl', version: '1.4.1'
37+
compile group: 'org.codehaus.jackson', name: 'jackson-core-asl', version: '1.4.1'
38+
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.0.1'
39+
compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.0.1'
40+
}
3041
}
3142

43+
44+
dependsOnChildren()
45+
3246
uploadArchives {
3347
repositories {
3448
/*
35-
(6) This will be used to deploy the Gradle artifact and ivy modules
36-
*/
37-
mavenRepo urls: "http://localhost:8080/artifactory/libs-releases-local";
49+
(6) This will be used to deploy the Gradle artifact and ivy modules
50+
*/
51+
52+
mavenRepo urls: "http://localhost:8080/artifactory/libs-snapshots-local";
53+
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials(REALM, HOST, USER, PASSWORD)
3854

3955
/*
40-
(3) Use this to also deploy an auto-generated POM
41-
*/
56+
(3) Use this to also deploy an auto-generated POM
57+
*/
58+
4259
repositories.mavenDeployer {
43-
repository(url: "http://localhost:8080/artifactory/libs-releases-local") {
60+
repository(url: "http://localhost:8080/artifactory/libs-snapshots-local") {
4461
/*
45-
(4) The login/password of an Artifactory user with deploy privileges.
46-
USER and PASSWORD are coming from gradle.properties
47-
*/
62+
(4) The login/password of an Artifactory user with deploy privileges.
63+
USER and PASSWORD are coming from gradle.properties
64+
*/
65+
4866
authentication(userName: USER, password: PASSWORD)
4967
}
50-
pom.version = versionNumber
51-
pom.artifactId = artifactId
52-
pom.groupId = groupId
68+
/* pom.version = versionNumber
69+
pom.artifactId = artifactId
70+
pom.groupId = groupId*/
5371
}
5472
}
55-
}
73+
}

settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include 'build-info-api', 'build-info-client'

0 commit comments

Comments
 (0)