forked from mkdecisiondev/moqui-pac4j-authentication
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
40 lines (32 loc) · 1.36 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
apply plugin: 'groovy'
def moquiDir = file(projectDir.absolutePath + '/../../..')
def frameworkDir = file(moquiDir.absolutePath + '/framework')
def jarBaseName = 'moqui-pac4j-authentication'
sourceCompatibility = '1.8'
repositories {
flatDir name: 'localLib', dirs: frameworkDir.absolutePath + '/lib'
mavenCentral()
}
dependencies {
compile project(':framework')
// use more recent version of bcprov-jdk15on to match what is used in moqui-sftp by sshj to avoid duplicate jars (org.pac4j:pac4j-jwt:3.0.2 uses org.bouncycastle:bcprov-jdk15on:1.59)
compile 'org.bouncycastle:bcprov-jdk15on:1.68'
// use more recent version of commons-collections4 to match version used elsewhere
compile 'org.apache.commons:commons-collections4:4.4'
// pac4j
compile 'org.pac4j:pac4j-oidc:3.0.2'
compile 'org.pac4j:pac4j-jwt:3.0.2'
}
check.dependsOn.clear()
task cleanLib(type: Delete) { delete fileTree(dir: projectDir.absolutePath+'/lib', include: '*') }
clean.dependsOn cleanLib
jar {
destinationDir = file(projectDir.absolutePath + '/lib')
baseName = jarBaseName
}
task copyDependencies { doLast {
copy { from (configurations.runtime - project(':framework').configurations.runtime - project(':framework').jar.archivePath)
into file(projectDir.absolutePath + '/lib') }
} }
copyDependencies.dependsOn cleanLib
jar.dependsOn copyDependencies