Simplify build for different auth strategies

This commit is contained in:
Aleksandar Vidakovic
2022-01-03 06:15:04 +08:00
committed by Petri Tuomola
parent c691c11699
commit 907f932abe
39 changed files with 194 additions and 331 deletions
-32
View File
@@ -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'