forked from adobe-sign/AdobeSignJavaSdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
140 lines (129 loc) · 4.88 KB
/
build.gradle
File metadata and controls
140 lines (129 loc) · 4.88 KB
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
group = 'com.adobe.sign'
version = '1.1.1'
buildscript {
repositories {
jcenter()
}
}
allprojects {
repositories {
jcenter()
}
task wrapper(type: Wrapper) {
gradleVersion = '2.11'
}
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
test {
maxParallelForks=java.lang.Runtime.runtime.availableProcessors()
}
ext {
swagger_annotations_version = "1.5.9"
jackson_version = "2.7.4"
jackson_datatype_joda = "2.7.4"
jersey_version = "1.19.1"
jodatime_version = "2.9.4"
commons_validator_version = "1.5.1"
log4j_version = "1.2.17"
junit_version = "4.12"
}
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "com.sun.jersey:jersey-client:$jersey_version"
compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version"
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_datatype_joda"
compile "joda-time:joda-time:$jodatime_version"
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "commons-validator:commons-validator:$commons_validator_version"
compile "log4j:log4j:$log4j_version"
testCompile "junit:junit:$junit_version"
}
}
project(':rest-api-sdk') {
def newJarName = rootProject.name + '-' + rootProject.version
jar.baseName = newJarName
jar.doLast {
copy {
from "${buildDir}/libs/${newJarName}.jar"
into "../build/libs"
}
}
task testSetup (dependsOn: 'classes', type: JavaExec) {
main = 'com.adobe.sign.utils.TestSetup'
classpath = sourceSets.test.runtimeClasspath
}
test.dependsOn testSetup
}
project(':rest-api-sample') {
dependencies {
compile project(':rest-api-sdk')
sourceSets {
samples{
main {
java {
srcDir './src/main/java'
}
}
}
}
def list=["ArchiveAllSignedAgreements",
"CreateAlternateParticipant",
"CreateNewGroupInAccount",
"CreateNewUserInAccount",
"CreateNewWidgetWithCounterSigners",
"DownloadAuditTrail",
"DownloadDocumentsOfAgreement",
"GetGroupsInAccount",
"GetNextParticipantInfoOfAllWaitingAgreements",
"GetPersonalLibraryDocumentsOfUser",
"GetSearchAgreementAssetEventsForUser",
"GetSigningUrl",
"GetStatusOfAgreements",
"GetStatusOfMegaSigns",
"GetUrlForManagePage",
"GetUrlForSettingsPage",
"GetUrlForViewAgreementAssetPage",
"GetUsersInAccount",
"RetrieveFormDataOfWidget",
"SendAgreementUsingLibraryDocument",
"SendAgreementUsingTransientDocument",
"SendMegaSignUsingLibraryDocument",
"SendMegaSignUsingTransientDocument",
"SendReminderOnPendingAgreements",
"SendToGroup"].toArray()
def fileName = ""
def pathPrefix = "com.adobe.sign.api."
def filePath = ""
task createTasks {
list.length.times { counter ->
fileName = list[counter]
filePath = pathPrefix +list[counter]
task "Sample_$fileName"(type: JavaExec) {
main = filePath
classpath = sourceSets.main.runtimeClasspath
}
}
}
task allSamples (dependsOn: [createTasks,tasks.matching{Task task -> task.name.startsWith("Sample_")}]){
}
def pathOAuthSampleDesktop = "com.adobe.sign.api.OAuth.desktopApp.CreateGroupWithOAuthWorkFlowUsingDesktopApp"
def pathOAuthSampleServer = "com.adobe.sign.api.OAuth.server.CreateGroupWithOAuthWorkFlowUsingServer"
task CreateGroupWithOAuthWorkFlowUsingDesktopApp(type: JavaExec){
main = pathOAuthSampleDesktop
classpath = sourceSets.main.runtimeClasspath
}
task CreateGroupWithOAuthWorkFlowUsingServer(type: JavaExec){
main = pathOAuthSampleServer
classpath = sourceSets.main.runtimeClasspath
}
}
}