-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
42 lines (33 loc) · 1.35 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
apply plugin: 'groovy'
def moquiDir = file(projectDir.absolutePath + '/../../..')
def frameworkDir = file(moquiDir.absolutePath + '/framework')
def jarBaseName = 'moqui-pac4j-authentication'
repositories {
flatDir name: 'localLib', dirs: frameworkDir.absolutePath + '/lib'
mavenCentral()
}
dependencies {
implementation project(':framework')
// use more recent version of commons-collections4 to match version used elsewhere
implementation 'org.apache.commons:commons-collections4:4.4'
// pac4j
implementation 'org.pac4j:pac4j-core:5.7.1'
implementation 'org.pac4j:pac4j-javaee:5.7.1'
implementation 'org.pac4j:pac4j-oidc:5.7.1'
// explicit dependencies to get newer versions
implementation 'net.minidev:json-smart:2.5.0'
implementation 'com.google.guava:guava:32.1.2-jre'
}
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.runtimeClasspath - project(':framework').configurations.runtimeClasspath - project(':framework').jar.archivePath)
into file(projectDir.absolutePath + '/lib') }
} }
copyDependencies.dependsOn cleanLib
jar.dependsOn copyDependencies