forked from dokipen/embedly-java
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
141 lines (123 loc) · 4.32 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin:com.smokejumperit.gradle.CukePlugin
apply plugin:de.huxhorn.gradle.pgp.PgpPlugin
version = '0.1.5-SNAPSHOT'
configurations {
runtime.exclude module: 'groovy'
}
buildscript {
repositories {
mavenCentral()
mavenRepo urls:'http://repo.smokejumperit.com'
}
dependencies {
classpath 'com.smokejumperit:gradle-plugins:0.8.2'
classpath 'org.yaml:snakeyaml:1.12'
classpath 'de.huxhorn.gradle:de.huxhorn.gradle.pgp-plugin:0.0.3'
}
}
repositories {
mavenCentral()
mavenRepo urls: "https://oss.sonatype.org/content/repositories/snapshots"
}
dependencies {
compile 'org.json:json:20090211'
compile 'org.apache.httpcomponents:httpclient:4.0-beta2'
compile 'commons-lang:commons-lang:2.5'
groovy 'org.codehaus.groovy:groovy-all:1.7.6'
testCompile 'org.codehaus.groovy:groovy-all:1.7.6'
testCompile 'junit:junit:4.8.2'
testCompile 'org.hamcrest:hamcrest-all:1.1'
testRuntime 'org.picocontainer:picocontainer:2.13.2'
}
jar {
manifest {
attributes 'Specification-Title': 'Embedly Java Client',
'Specification-Version': version,
'Specification-Vendor': 'Embedly, Inc.',
'Implementation-Title': 'com.embedly.api',
'Implementation-Version': version,
'Implementation-Vendor': 'Embedly, Inc.'
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task runSimple(dependsOn: [classes, testClasses], type: JavaExec) {
main = 'com.embedly.examples.Simple'
classpath = sourceSets.main.runtimeClasspath + sourceSets.test.runtimeClasspath
}
artifacts {
archives javadocJar
archives sourcesJar
}
if (project.hasProperty("pgpKeyId")) {
pgp {
secretKeyRingFile = new File("${System.properties['user.home']}/.gnupg/secring.gpg")
keyId = pgpKeyId
password = pgpPassword
}
}
uploadArchives.dependsOn sourcesJar, javadocJar
uploadArchives {
if (project.hasProperty('repoUserName') && project.hasProperty('repoPassword')) {
repositories.mavenDeployer {
configureAuth = {
authentication(userName: repoUserName, password: repoPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/", configureAuth)
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/", configureAuth)
pom.project {
parent {
groupId 'org.sonatype.oss'
artifactId 'oss-parent'
version '7'
}
name 'Embedly API'
description 'Embedly client library for API and Pro'
url 'https://github.com/embedly/embedly-java'
inceptionYear "2011"
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
groupId 'com.embedly'
scm {
url 'https://github.com/embedly/embedly-java'
connection 'scm:git:https://github.com/embedly/embedly-java.git'
developerConnection 'scm:git:https://github.com/embedly/embedly-java.git'
}
developers {
developer {
id "doki_pen"
name "Bob Corsaro"
email "[email protected]"
url "http://www.google.com/profiles/rcorsaro"
roles {
role "Lead"
role "Founder"
}
timezone 'America/New_York'
}
}
}
}
}
}
task copySteps(type: Copy) {
from 'src/test/features/steps'
into 'build/classes/test'
}
runFeatures.dependsOn copySteps
build.dependsOn runFeatures