add access restrictions for a few unwelcome classes
This commit is contained in:
29
build.gradle
29
build.gradle
@@ -1,3 +1,5 @@
|
|||||||
|
import org.gradle.plugins.ide.eclipse.model.AccessRule
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
|
||||||
@@ -34,6 +36,18 @@ ext {
|
|||||||
lib_spring_boot_mustache='org.springframework.boot:spring-boot-starter-mustache:2.1.2.RELEASE'
|
lib_spring_boot_mustache='org.springframework.boot:spring-boot-starter-mustache:2.1.2.RELEASE'
|
||||||
lib_spring_boot_test='org.springframework.boot:spring-boot-starter-test:2.1.2.RELEASE'
|
lib_spring_boot_test='org.springframework.boot:spring-boot-starter-test:2.1.2.RELEASE'
|
||||||
lib_spring_boot_web='org.springframework.boot:spring-boot-starter-web:2.1.2.RELEASE'
|
lib_spring_boot_web='org.springframework.boot:spring-boot-starter-web:2.1.2.RELEASE'
|
||||||
|
|
||||||
|
eclipseAccessRestrictions = [
|
||||||
|
'org.eclipse.jdt.launching.JRE_CONTAINER': [
|
||||||
|
new AccessRule('nonaccessible', 'com/sun/**'),
|
||||||
|
new AccessRule('nonaccessible', 'java/awt/List'),
|
||||||
|
new AccessRule('nonaccessible', 'sun/**'),
|
||||||
|
],
|
||||||
|
'assertj-core': [
|
||||||
|
new AccessRule('nonaccessible', 'org/assertj/core/internal/**'),
|
||||||
|
new AccessRule('nonaccessible', 'org/assertj/core/util/Arrays')
|
||||||
|
]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -72,6 +86,21 @@ subprojects {
|
|||||||
dependencies {
|
dependencies {
|
||||||
testCompile group: 'org.testng', name: 'testng', version: '6.14.3'
|
testCompile group: 'org.testng', name: 'testng', version: '6.14.3'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eclipse {
|
||||||
|
classpath {
|
||||||
|
file {
|
||||||
|
whenMerged {
|
||||||
|
eclipseAccessRestrictions.each{ path, restrictions ->
|
||||||
|
def container = entries.find { it.path.contains path }
|
||||||
|
if (container != null) {
|
||||||
|
container.accessRules.addAll(restrictions)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
|||||||
Reference in New Issue
Block a user