Update to Gradle 7.3.3
Issue gh-610 Closes gh-613 Closes gh-581
This commit is contained in:
@@ -1,35 +1,39 @@
|
||||
apply from: 'javacc.gradle'
|
||||
plugins {
|
||||
id 'io.spring.convention.spring-module'
|
||||
id 'com.intershop.gradle.javacc'
|
||||
}
|
||||
|
||||
idea.module.excludeDirs = [
|
||||
file('.gradle'),
|
||||
file('build/javacc'),
|
||||
file('build/classes'),
|
||||
file('build/tmp'),
|
||||
file('build/dependency-cache'),
|
||||
file('build/libs')]
|
||||
javacc {
|
||||
// configuration container for all javacc configurations
|
||||
configs {
|
||||
template {
|
||||
inputFile = file('src/main/javacc/DnParserImpl.jj')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.springframework:spring-core:$springVersion",
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-tx:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion"
|
||||
management platform(project(":spring-ldap-dependencies"))
|
||||
implementation "org.springframework:spring-core"
|
||||
implementation "org.springframework:spring-beans"
|
||||
implementation "org.springframework:spring-tx"
|
||||
implementation "org.slf4j:slf4j-api"
|
||||
|
||||
optional "org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.springframework:spring-orm:$springVersion",
|
||||
"com.querydsl:querydsl-core:$queryDslVersion",
|
||||
"com.querydsl:querydsl-apt:$queryDslVersion",
|
||||
"commons-pool:commons-pool:$commonsPoolVersion",
|
||||
"org.apache.commons:commons-pool2:$commonsPool2Version"
|
||||
optional "org.springframework:spring-context"
|
||||
optional "org.springframework:spring-jdbc"
|
||||
optional "org.springframework:spring-orm"
|
||||
optional "com.querydsl:querydsl-core"
|
||||
optional "com.querydsl:querydsl-apt"
|
||||
optional "commons-pool:commons-pool"
|
||||
optional "org.apache.commons:commons-pool2"
|
||||
implementation 'jakarta.xml.bind:jakarta.xml.bind-api'
|
||||
|
||||
provided "com.sun:ldapbp:1.0"
|
||||
|
||||
testCompile "junit:junit:$junitVersion",
|
||||
"commons-lang:commons-lang:$commonsLangVersion",
|
||||
"gsbase:gsbase:$gsbaseVersion",
|
||||
"org.mockito:mockito-core:$mockitoVersion",
|
||||
"org.slf4j:slf4j-log4j12:$slf4jVersion",
|
||||
"org.springframework:spring-test:$springVersion",
|
||||
"org.assertj:assertj-core:$assertjVersion",
|
||||
powerMockDependencies
|
||||
testImplementation "junit:junit"
|
||||
testImplementation "commons-lang:commons-lang"
|
||||
testImplementation "gsbase:gsbase"
|
||||
testImplementation "org.mockito:mockito-core"
|
||||
testImplementation "org.springframework:spring-test"
|
||||
testImplementation "org.assertj:assertj-core"
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
|
||||
task downloadJavacc {
|
||||
ext.file = "javacc-5.0.tar.gz"
|
||||
ext.dest = file("$buildDir/javacc/$file")
|
||||
ext.url = "https://repo.spring.io/ext-release-local/net/java/dev/javacc/javacc/5.0/$file"
|
||||
|
||||
outputs.file dest
|
||||
|
||||
doLast {
|
||||
dest.parentFile.mkdirs()
|
||||
new URL(url).withInputStream{ i -> dest.withOutputStream{ it << i }}
|
||||
}
|
||||
}
|
||||
|
||||
task installJavacc(type:Copy,dependsOn:downloadJavacc) {
|
||||
ext.archive = downloadJavacc.dest
|
||||
ext.javaccHome = file("$buildDir/javacc/")
|
||||
|
||||
inputs.file archive
|
||||
outputs.dir javaccHome
|
||||
|
||||
if(archive.name.endsWith('.zip')) {
|
||||
from zipTree(archive)
|
||||
} else {
|
||||
from tarTree(archive)
|
||||
}
|
||||
into javaccHome
|
||||
}
|
||||
|
||||
task javacc(dependsOn:installJavacc) {
|
||||
ext.srcFile = file("src/main/javacc/DnParserImpl.jj")
|
||||
ext.srcDestDir = file("$buildDir/generated-src/javacc")
|
||||
ext.destDir = file("$srcDestDir/org/springframework/ldap/core")
|
||||
ext.homeDir = file("${installJavacc.javaccHome.path}/javacc-5.0")
|
||||
|
||||
inputs.file srcFile
|
||||
outputs.dir destDir
|
||||
|
||||
doLast {
|
||||
destDir.mkdirs()
|
||||
ant.javacc (
|
||||
target:"src/main/javacc/DnParserImpl.jj",
|
||||
outputdirectory : destDir,
|
||||
javacchome: homeDir,
|
||||
jdkversion: sourceCompatibility)
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir project.javacc.srcDestDir
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
from javacc.srcDestDir
|
||||
include "**/*.java"
|
||||
}
|
||||
|
||||
sourcesJar.dependsOn javacc
|
||||
compileJava.dependsOn javacc
|
||||
ideaModule.dependsOn javacc
|
||||
eclipseClasspath.dependsOn javacc
|
||||
@@ -20,10 +20,12 @@ import java.util.Base64;
|
||||
|
||||
import org.springframework.ldap.BadLdapGrammarException;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
|
||||
/**
|
||||
* Helper class to encode and decode ldap names and values.
|
||||
*
|
||||
*
|
||||
* @author Adam Skogman
|
||||
* @author Mattias Hellborg Arthursson
|
||||
* @author Thomas Darimont
|
||||
@@ -36,7 +38,7 @@ public final class LdapEncoder {
|
||||
private static String[] FILTER_ESCAPE_TABLE = new String['\\' + 1];
|
||||
|
||||
private static final int RFC2849_MAX_BASE64_CHARS_PER_LINE = 76;
|
||||
|
||||
|
||||
static {
|
||||
|
||||
// Name encoding table -------------------------------------
|
||||
@@ -91,7 +93,7 @@ public final class LdapEncoder {
|
||||
|
||||
/**
|
||||
* Escape a value for use in a filter.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* the value to escape.
|
||||
* @return a properly escaped representation of the supplied value.
|
||||
@@ -123,13 +125,13 @@ public final class LdapEncoder {
|
||||
|
||||
/**
|
||||
* LDAP Encodes a value for use with a DN. Escapes for LDAP, not JNDI!
|
||||
*
|
||||
*
|
||||
* <br>Escapes:<br> ' ' [space] - "\ " [if first or last] <br> '#'
|
||||
* [hash] - "\#" <br> ',' [comma] - "\," <br> ';' [semicolon] - "\;" <br> '=
|
||||
* [equals] - "\=" <br> '+' [plus] - "\+" <br> '<' [less than] -
|
||||
* "\<" <br> '>' [greater than] - "\>" <br> '"' [double quote] -
|
||||
* "\"" <br> '\' [backslash] - "\\" <br>
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* the value to escape.
|
||||
* @return The escaped value.
|
||||
@@ -175,7 +177,7 @@ public final class LdapEncoder {
|
||||
|
||||
/**
|
||||
* Decodes a value. Converts escaped chars to ordinary chars.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* Trimmed value, so no leading an trailing blanks, except an
|
||||
* escaped space last.
|
||||
|
||||
Reference in New Issue
Block a user