Simplify build for different auth strategies
This commit is contained in:
committed by
Petri Tuomola
parent
c691c11699
commit
907f932abe
@@ -155,37 +155,6 @@ configurations {
|
||||
|
||||
apply from: 'dependencies.gradle'
|
||||
|
||||
/* Enable Oauth2 authentication based on environment, default to HTTP basic auth */
|
||||
if (project.hasProperty('security') && project.getProperty('security') == 'oauth') {
|
||||
if(project.hasProperty('twofactor') && project.getProperty('twofactor') == 'enabled') {
|
||||
copy {
|
||||
from './properties/oauth/twofactor/'
|
||||
into 'src/main/resources/'
|
||||
include '*.properties'
|
||||
}
|
||||
} else {
|
||||
copy {
|
||||
from './properties/oauth/'
|
||||
into 'src/main/resources/'
|
||||
include '*.properties'
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(project.hasProperty('twofactor') && project.getProperty('twofactor') == 'enabled') {
|
||||
copy {
|
||||
from './properties/basicauth/twofactor/'
|
||||
into 'src/main/resources/'
|
||||
include '*.properties'
|
||||
}
|
||||
} else {
|
||||
copy {
|
||||
from './properties/basicauth/'
|
||||
into 'src/main/resources/'
|
||||
include '*.properties'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration for the modernizer plugin
|
||||
// https://github.com/andygoossens/gradle-modernizer-plugin
|
||||
modernizer {
|
||||
@@ -324,7 +293,6 @@ jib {
|
||||
]
|
||||
args = [
|
||||
'-Duser.home=/tmp',
|
||||
'-Dspring.profiles.active=basicauth',
|
||||
'-Dfile.encoding=UTF-8',
|
||||
'-Duser.timezone=UTC',
|
||||
'-Djava.security.egd=file:/dev/./urandom'
|
||||
|
||||
Reference in New Issue
Block a user