From d67c6add0484284040e61c8e781ad847ecad0e47 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 16 May 2019 14:03:42 -0700 Subject: [PATCH 1/4] chore(deps): update dependency gradle to v5 --- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4230076d14a..9aa6db7e77f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip -distributionSha256Sum=8626cbf206b4e201ade7b87779090690447054bc93f052954c78480fa6ed186e +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip +distributionSha256Sum=7bdbad1e4f54f13c8a78abc00c26d44dd8709d4aedb704d913fb1bb78ac025dc zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From e38c6aef2f3e0873ad3b22e6a49755761842f007 Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Sun, 19 May 2019 14:20:53 -0700 Subject: [PATCH 2/4] build: support graphviz plugin and jpa model gen on Gradle 5 --- build.gradle | 2 +- .../uPortal-content-portlet/build.gradle | 13 +++---------- uPortal-events/build.gradle | 13 +++---------- uPortal-groups/uPortal-groups-pags/build.gradle | 13 +++---------- uPortal-i18n/build.gradle | 14 +++----------- uPortal-layout/uPortal-layout-core/build.gradle | 13 +++---------- uPortal-persondir/build.gradle | 13 +++---------- .../uPortal-security-permissions/build.gradle | 13 +++---------- uPortal-tenants/build.gradle | 15 ++++----------- uPortal-tools/build.gradle | 13 +++---------- uPortal-utils/uPortal-utils-core/build.gradle | 13 +++---------- uPortal-web/build.gradle | 13 +++---------- 12 files changed, 35 insertions(+), 113 deletions(-) diff --git a/build.gradle b/build.gradle index 06d3344a029..0636e655c0d 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { id 'net.researchgate.release' version '2.7.0' // Records all tasks in task graph, generates `build/reports/visteg.dot` // dot file can be converted to an image using graphviz. `dot -Tsvg -O -v visteg.dot` - id 'cz.malohlava' version '1.0.3' + id 'cz.malohlava.visteg' version '1.0.5' // Sub project plugins id 'com.github.sherter.google-java-format' version '0.8' apply false diff --git a/uPortal-content/uPortal-content-portlet/build.gradle b/uPortal-content/uPortal-content-portlet/build.gradle index 8bb0512eaaa..c1955ca8757 100644 --- a/uPortal-content/uPortal-content-portlet/build.gradle +++ b/uPortal-content/uPortal-content-portlet/build.gradle @@ -1,7 +1,6 @@ description = "Apereo uPortal Portlet Support" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } @@ -10,7 +9,7 @@ dependencies { compile project(':uPortal-rdbm') compileOnly "org.apache.portals.pluto:pluto-container-api:${plutoVersion}" - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" compileOnly "${portletApiDependency}" compileOnly "${servletApiDependency}" @@ -32,12 +31,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) } diff --git a/uPortal-events/build.gradle b/uPortal-events/build.gradle index 267e8499684..b1d15f5cb9b 100644 --- a/uPortal-events/build.gradle +++ b/uPortal-events/build.gradle @@ -1,7 +1,6 @@ description = "Apereo uPortal Events" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } @@ -15,7 +14,7 @@ dependencies { compile "org.apache.httpcomponents:httpclient:${httpclientVersion}" compileOnly "org.apache.portals.pluto:pluto-container-api:${plutoVersion}" - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" compileOnly "${portletApiDependency}" compileOnly "${servletApiDependency}" } @@ -35,12 +34,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) } diff --git a/uPortal-groups/uPortal-groups-pags/build.gradle b/uPortal-groups/uPortal-groups-pags/build.gradle index 9da0bdd6a87..dd1593f84eb 100644 --- a/uPortal-groups/uPortal-groups-pags/build.gradle +++ b/uPortal-groups/uPortal-groups-pags/build.gradle @@ -1,7 +1,6 @@ description = "Apereo uPortal Groups PAGS" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } @@ -15,7 +14,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}" compile "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" compileOnly "${servletApiDependency}" } @@ -34,12 +33,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) } diff --git a/uPortal-i18n/build.gradle b/uPortal-i18n/build.gradle index 4e34f5bd676..d259144e826 100644 --- a/uPortal-i18n/build.gradle +++ b/uPortal-i18n/build.gradle @@ -1,7 +1,6 @@ description = "Apereo uPortal i18n" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } @@ -10,7 +9,7 @@ dependencies { compile "org.slf4j:log4j-over-slf4j:${slf4jVersion}" - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" compileOnly "${servletApiDependency}" } @@ -29,13 +28,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) } - diff --git a/uPortal-layout/uPortal-layout-core/build.gradle b/uPortal-layout/uPortal-layout-core/build.gradle index 65d4023c40b..f948efe5190 100644 --- a/uPortal-layout/uPortal-layout-core/build.gradle +++ b/uPortal-layout/uPortal-layout-core/build.gradle @@ -1,7 +1,6 @@ description = "Apereo uPortal Layout" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } @@ -19,7 +18,7 @@ dependencies { testCompile "${servletApiDependency}" compileOnly "org.apache.portals.pluto:pluto-container-api:${plutoVersion}" - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" compileOnly "${servletApiDependency}" } @@ -38,12 +37,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) } diff --git a/uPortal-persondir/build.gradle b/uPortal-persondir/build.gradle index d1aefac439f..2068d297c48 100644 --- a/uPortal-persondir/build.gradle +++ b/uPortal-persondir/build.gradle @@ -1,14 +1,13 @@ description = "Apereo uPortal Person Directory" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } dependencies { compile project(':uPortal-security:uPortal-security-core') - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" compileOnly "${portletApiDependency}" compileOnly "${servletApiDependency}" @@ -31,12 +30,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) } diff --git a/uPortal-security/uPortal-security-permissions/build.gradle b/uPortal-security/uPortal-security-permissions/build.gradle index cf8ed183bb2..ce0570e5daf 100644 --- a/uPortal-security/uPortal-security-permissions/build.gradle +++ b/uPortal-security/uPortal-security-permissions/build.gradle @@ -1,7 +1,6 @@ description = "Apereo uPortal Security Permissions" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } @@ -12,7 +11,7 @@ dependencies { compile project(':uPortal-security:uPortal-security-core') compile project(':uPortal-spring') - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" } /* @@ -30,12 +29,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) } diff --git a/uPortal-tenants/build.gradle b/uPortal-tenants/build.gradle index 14e3cf0fc95..b7edf728e91 100644 --- a/uPortal-tenants/build.gradle +++ b/uPortal-tenants/build.gradle @@ -1,7 +1,6 @@ description = "Apereo uPortal Tenants" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } @@ -11,7 +10,7 @@ dependencies { compile "javax.mail:mail:${javaxMailVersion}" - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s compileOnly "${servletApiDependency}" } @@ -30,12 +29,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] -} +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) +} \ No newline at end of file diff --git a/uPortal-tools/build.gradle b/uPortal-tools/build.gradle index 448056eb8ec..ea936d99089 100644 --- a/uPortal-tools/build.gradle +++ b/uPortal-tools/build.gradle @@ -1,7 +1,6 @@ description = "Apereo uPortal Tools" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } @@ -15,7 +14,7 @@ dependencies { compile "org.apache.ant:ant:${antVersion}" compile "org.codehaus.groovy:groovy:${groovyVersion}" - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s compileOnly "${servletApiDependency}" } @@ -34,12 +33,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) } diff --git a/uPortal-utils/uPortal-utils-core/build.gradle b/uPortal-utils/uPortal-utils-core/build.gradle index 1ac832e7e45..cea1840c192 100644 --- a/uPortal-utils/uPortal-utils-core/build.gradle +++ b/uPortal-utils/uPortal-utils-core/build.gradle @@ -1,7 +1,6 @@ description = "Apereo uPortal Utilities" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } @@ -72,7 +71,7 @@ dependencies { testCompile "${servletApiDependency}" compileOnly "org.apache.portals.pluto:pluto-container-api:${plutoVersion}" - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" compileOnly "${portletApiDependency}" compileOnly "${servletApiDependency}" } @@ -92,12 +91,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) } diff --git a/uPortal-web/build.gradle b/uPortal-web/build.gradle index 5d527280600..f1d631cb9d8 100644 --- a/uPortal-web/build.gradle +++ b/uPortal-web/build.gradle @@ -1,7 +1,6 @@ description = "Apereo uPortal Web" ext { - // Solution for JPA Modelgen based on http://stackoverflow.com/a/23218255/1651116 generatedSourcesDir = file("${buildDir}/generated-sources/javac/main/java") } @@ -20,7 +19,7 @@ dependencies { compileOnly "org.apache.portals.pluto:pluto-container-api:${plutoVersion}" compileOnly "org.apache.portals.pluto:pluto-container-driver-api:${plutoVersion}" compileOnly "org.apache.portals.pluto:pluto-taglib:${plutoVersion}" - compileOnly "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s + annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernateJpamodelgenVersion}" // Required for javac -s compileOnly "javax.servlet.jsp:javax.servlet.jsp-api:${jspApiVersion}" compileOnly "${portletApiDependency}" compileOnly "${servletApiDependency}" @@ -41,12 +40,6 @@ sourceSets { } } -// These are the only modifications to build process that are required. -compileJava { - doFirst { - // Generated sources directory should be present & empty before compilation - generatedSourcesDir.deleteDir() - generatedSourcesDir.mkdirs() - } - options.compilerArgs += ['-s', generatedSourcesDir] +tasks.withType(JavaCompile) { + options.annotationProcessorGeneratedSourcesDirectory = file(generatedSourcesDir) } From 420ec2df10db2f13c1b23dcf60ef4bddf45050a0 Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Sun, 19 May 2019 14:33:08 -0700 Subject: [PATCH 3/4] test: gradle 5 removed to no upward option from the CLI --- .travis.yml | 6 +++--- appveyor.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b3831edd63..0f49b021c65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,13 +8,13 @@ matrix: jdk: openjdk8 - os: osx osx_image: xcode9.2 # OSX 10.12, Oracle Java 8 - script: ./gradlew -u -S --no-daemon --no-parallel build # skip coveralls on MacOS + script: ./gradlew -S --no-daemon --no-parallel build # skip coveralls on MacOS # The 'build' task runs most things, including test, check, & static analysis install: true script: - - ./gradlew -u -S --no-daemon --no-parallel build jacocoAggregateReport coveralls - - ./gradlew -u -S --no-daemon --no-parallel :npm_run_lint-js + - ./gradlew -S --no-daemon --no-parallel build jacocoAggregateReport coveralls + - ./gradlew -S --no-daemon --no-parallel :npm_run_lint-js cache: directories: diff --git a/appveyor.yml b/appveyor.yml index 670978b5370..9b293b79129 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,7 @@ install: - gradlew.bat --version # The 'build' task runs most things, including test, check, & static analysis build: off -test_script: gradlew.bat -u -S --no-daemon --no-parallel build +test_script: gradlew.bat -S --no-daemon --no-parallel build cache: - C:\Users\appveyor\.npm - C:\Users\appveyor\.gradle From 352b424e589223069ee96037f03db8666c8bc1f4 Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Tue, 21 May 2019 07:01:56 -0700 Subject: [PATCH 4/4] build: increase allowed memory and heap --- gradle.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle.properties b/gradle.properties index 012606d1c47..4df2c55c089 100644 --- a/gradle.properties +++ b/gradle.properties @@ -119,3 +119,4 @@ whatwgFetchPolyfillVersion=3.0.0 # gradle settings org.gradle.parallel=true +org.gradle.jvmargs=-Xmx2048M -XX\:MaxHeapSize\=32g