forked from OpenLiberty/sample-acmegifts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
154 lines (131 loc) · 5.98 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
142
143
144
145
146
147
148
149
150
151
152
153
154
description = 'Acme gift giving using microservices'
allprojects {
apply plugin: 'maven'
group = 'microprofile.gift.demo'
version = '0.0.1-SNAPSHOT'
}
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.1"
classpath "gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.6"
/* To use googleJavaFormat, execute: gradle goJF
* To use verifyGoogleJavaFormat, execute: gradle verGJF
*
* To configure the formatter, use the googleJavaFormat {} extension in the appropriate build.gradle file
* For more information, consult the GitHub documentation:
*
* https://github.com/sherter/google-java-format-gradle-plugin
*/
}
}
// Apply the Liberty Plugin to specific projects
configure( subprojects.findAll {it.name != 'run-app' & it.name != 'shared-keystore'} ) {
apply plugin: 'liberty'
dependencies {
libertyRuntime group: 'io.openliberty', name: 'openliberty-runtime', version:'17.0.0.4'
}
}
// Configuration for all subprojects
subprojects {
apply plugin: "com.github.sherter.google-java-format"
apply plugin: 'war'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
configurations {
keystore
}
repositories {
mavenCentral()
maven { url "http://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/wasliberty-open-liberty/" }
maven { url "https://repo.eclipse.org/content/groups/releases/" }
}
dependencies {
testCompile group: 'junit', name: 'junit', version:'4.12'
testCompile group: 'org.glassfish', name: 'javax.json', version:'1.0.4'
testCompile group: 'org.apache.cxf', name: 'cxf-rt-rs-client', version:'3.1.1'
testCompile group: 'org.springframework', name: 'spring-context', version:'4.3.9.RELEASE'
testCompile project(':shared-keystore')
providedCompile group: 'javax', name: 'javaee-api', version:'7.0'
providedCompile group: 'org.eclipse.microprofile.config', name: 'microprofile-config-api', version:'1.0'
providedCompile group: 'org.eclipse.microprofile.jwt', name: 'microprofile-jwt-auth-api', version:'1.0-RC10'
providedCompile group: 'com.ibm.websphere.appserver.api', name: 'com.ibm.websphere.appserver.api.jwt', version:'1.0.16'
keystore project(':shared-keystore')
}
// Extra Properties
ext {
// Optional Microservice Configuration
hostname = 'localhost'
userHostname = hostname
userHttpPort = 5050
userHttpsPort = 5051
userURL = "https://${userHostname}:${userHttpsPort}"
userServiceLoginURL = userURL + '/logins'
userServiceURL = userURL + '/users'
userMongoHostname = hostname
userMongoPort = 5052
groupHostname = hostname
groupHttpPort = 5053
groupHttpsPort = 5054
groupURL = "https://${groupHostname}:${groupHttpsPort}"
groupServiceURL = groupURL + '/groups'
groupMongoHostname = hostname
groupMongoPort = 5055
occasionHostname = hostname
occasionHttpPort = 5056
occasionHttpsPort = 5057
occasionURL = "https://${occasionHostname}:${occasionHttpsPort}"
occasionServiceURL = occasionURL + '/occasions'
occasionMongoHostname = hostname
occasionMongoPort = 5058
notificationHostname = hostname
notificationHttpPort = 5059
notificationHttpsPort = 5060
notification_v1_1_Hostname = hostname
notification_v1_1_HttpPort = 5061
notification_v1_1_HttpsPort = 5062
frontendHostname = hostname
frontendHttpPort = 5063
frontendHttpsPort = 5064
frontendURL = "https://${frontendHostname}:${frontendHttpsPort}"
authHostname = hostname
authHttpPort = 5065
authHttpsPort = 5066
authURL = "https://${authHostname}:${authHttpsPort}"
authServiceURL = authURL + '/auth'
// Optional path to the Mongo installation's bin directory (i.e. /myDatabases/mongodb/bin)
// It is used when auto starting and stopping the databases.
mongoPath = ''
// JSON Web Token used for microservice authorization
jwtShareKey = 'secret'
jwtIssuer = 'http://wasdev.net'
/*********************************************
Optional Twitter configuration
IMPORTANT.
Replace the CHANGE_ME values with valid twitter generated keys/secrets/tokens.
The consumer key/secret are required for Twitter login and for tweeting.
The user access key/secret are only required for tweeting.
These values can be obtained from a valid twitter account application to be used on behalf of the Gifts application.
Steps for setting up and obtaining the needed values:
a. Go to: https://apps.twitter.com/ to register the 'Acme Gifts' application under a
valid twitter account. This account will be used on behalf of the Acme Gifts application.
NOTE: Be sure to fill in the 'Callback URL' section when creating the application. The entry can be a dummy URL.
If the application exists already, go to the 'Settings' tab and make sure something was
specified in the 'Callback URL' section.
b. Under the Details tab, modify the access level to 'Read, write, and direct messages'.
c. Under the 'Key and Access Tokens' tab, generate access token/secret.
d. Replace CHANGE_ME with the consumer key/secret and the access
token/secret generated values.
*********************************************/
twitterAppConsumerKey = 'CHANGE_ME'
twitterAppConsumerSecret = 'CHANGE_ME'
twitterUserAccessToken = 'CHANGE_ME'
twitterUserAccessSecret = 'CHANGE_ME'
}
}