portal-vlabs-display-portlet/build.gradle

53 lines
2.7 KiB
Groovy

repositories {
mavenCentral()
// same URL (no trailing slash) as the workspace buildscript: the offline cache holds Mockito/AssertJ under this repository
maven { url "https://repository-cdn.liferay.com/nexus/content/groups/public" }
maven { url "https://repository-cdn.liferay.com/nexus/content/groups/public/" }
maven { url "https://nexus.d4science.org/nexus/content/repositories/gcube-releases-java17/" }
maven { url "https://nexus.d4science.org/nexus/content/repositories/gcube-snapshots-java17/" }
}
dependencies {
implementation platform("org.gcube.distribution:gcube-bom:4.0.3")
implementation platform("org.gcube.distribution:maven-portal-bom:5.0.0-SNAPSHOT")
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel"
compileOnly group: "com.liferay.portal", name: "release.dxp.api"
compileOnly group: 'com.liferay', name: 'com.liferay.petra.string'
compileOnly group: "com.liferay", name: "com.liferay.product.navigation.control.menu.api"
compileOnly group: "com.liferay", name: "com.liferay.product.navigation.taglib"
compileOnly group: "jakarta.servlet", name: "jakarta.servlet-api"
compileOnly group: "com.liferay.jakarta.portlet", name: "com.liferay.jakarta.portlet-api"
compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations"
compileOnly group: "javax.servlet.jsp.jstl", name: "javax.servlet.jsp.jstl-api", version: "1.2.2"
compileOnly project(":modules:portal-manager-core")
compileOnly project(":modules:portal-usermanagement-core")
}
configurations {
// the unit tests need the same classes the bundle sees at run time from the platform and other bundles
testImplementation.extendsFrom compileOnly
}
dependencies {
testImplementation platform("org.junit:junit-bom:5.10.2")
testImplementation "org.junit.jupiter:junit-jupiter"
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
testImplementation "org.mockito:mockito-core:5.11.0"
testImplementation "org.assertj:assertj-core:3.25.3"
// Liferay portal-kernel utilities (ParamUtil, ThemeDisplay) log through log4j
testImplementation "org.apache.logging.log4j:log4j-api:2.24.3"
testImplementation "org.apache.logging.log4j:log4j-core:2.24.3"
// ParamUtil initialisation reads the portal properties through commons-configuration
testImplementation "commons-configuration:commons-configuration:1.10"
testImplementation "commons-lang:commons-lang:2.6"
}
test {
useJUnitPlatform()
// Liferay kernel classes (SystemProperties, used by LogFactoryUtil) need reflective access to java.lang.invoke
jvmArgs "--add-opens=java.base/java.lang.invoke=ALL-UNNAMED", "--add-opens=java.base/java.lang=ALL-UNNAMED"
}