2018-02-03 05:55:12 +08:00
|
|
|
ext {
|
|
|
|
httpPort = 8082
|
|
|
|
httpsPort = 8482
|
|
|
|
appUrl = "http://localhost:${httpPort}/${war.baseName}"
|
|
|
|
}
|
|
|
|
|
|
|
|
liberty {
|
|
|
|
server {
|
|
|
|
name = 'auth-service'
|
|
|
|
dropins = [war]
|
|
|
|
bootstrapProperties = ['httpPort': httpPort, 'httpsPort': httpsPort]
|
2018-02-20 00:12:03 +08:00
|
|
|
configDirectory = file('src/main/liberty/config')
|
2018-05-24 01:44:18 +08:00
|
|
|
jvmOptions = ['-Dorg.libertybikes.auth.service.github.GitHubOAuthAPI/mp-rest/url=https://github.com',
|
|
|
|
'-Dorg.libertybikes.auth.service.github.GitHubUserAPI/mp-rest/url=https://api.github.com']
|
2018-02-03 05:55:12 +08:00
|
|
|
}
|
|
|
|
}
|
2018-02-20 00:12:03 +08:00
|
|
|
dependencies {
|
2018-04-21 02:16:52 +08:00
|
|
|
compile group: 'io.jsonwebtoken', name: 'jjwt', version: '0.9.0'
|
|
|
|
compile group: 'com.google.api-client', name: 'google-api-client', version: '1.23.0'
|
2018-02-20 00:12:03 +08:00
|
|
|
}
|
|
|
|
|
2018-02-03 05:55:12 +08:00
|
|
|
|
|
|
|
libertyStart.doLast {
|
|
|
|
println "Application available at: ${appUrl}"
|
|
|
|
}
|
|
|
|
|
|
|
|
task open {
|
|
|
|
doLast {
|
|
|
|
java.awt.Desktop.desktop.browse "${appUrl}/token".toURI()
|
|
|
|
}
|
|
|
|
}
|