Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Update JHipster to 7.4.0 #8

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,9 @@ Desktop.ini
# ESLint
######################
.eslintcache

######################
# Code coverage
######################
/coverage/
/.nyc_output/
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
5 changes: 0 additions & 5 deletions .huskyrc

This file was deleted.

2 changes: 1 addition & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
'{,src/**/,webpack/}*.{md,json,yml,html,js,ts,tsx,css,scss,java}': ['prettier --write'],
'{,src/**/,webpack/}*.{md,json,yml,html,cjs,mjs,js,ts,tsx,css,scss,java}': ['prettier --write'],
};
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ useTabs: false
arrowParens: avoid

# jsx and tsx rules:
jsxBracketSameLine: false
bracketSameLine: false

# java rules:
overrides:
Expand Down
6 changes: 4 additions & 2 deletions .yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"websocket": false,
"packageName": "com.adyen.demo.store",
"packageFolder": "com/adyen/demo/store",
"jhipsterVersion": "7.0.0",
"jhipsterVersion": "7.4.0",
"skipServer": false,
"clientPackageManager": "npm",
"dtoSuffix": "DTO",
Expand All @@ -45,6 +45,8 @@
"lastLiquibaseTimestamp": 1616596655000,
"herokuAppName": "deepu-ecom-test-888",
"herokuDeployType": "jar",
"herokuJavaVersion": "11"
"herokuJavaVersion": "11",
"enableGradleEnterprise": false,
"devServerPort": 9060
}
}
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# store

This application was generated using JHipster 7.0.0, you can find documentation and help at [https://www.jhipster.tech/documentation-archive/v7.0.0](https://www.jhipster.tech/documentation-archive/v7.0.0).
This application was generated using JHipster 7.4.0, you can find documentation and help at [https://www.jhipster.tech/documentation-archive/v7.4.0](https://www.jhipster.tech/documentation-archive/v7.4.0).

The below environment variables must be set in order for the application to work properly and also for tests to run. Remember to add `http://localhost:8080` as an origin for client key.

Expand Down Expand Up @@ -99,6 +99,14 @@ Note: There are still a few other things remaining to do for Leaflet that we won

For further instructions on how to develop with JHipster, have a look at [Using JHipster in development][].

### JHipster Control Center

JHipster Control Center can help you manage and control your application(s). You can start a local control center server (accessible on http://localhost:7419) with:

```
docker-compose -f src/main/docker/jhipster-control-center.yml up
```

## Building for production

### Packaging as jar
Expand Down Expand Up @@ -202,18 +210,17 @@ For more information refer to [Using Docker and Docker-Compose][], this page als
To configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information.

[jhipster homepage and latest documentation]: https://www.jhipster.tech
[jhipster 7.0.0 archive]: https://www.jhipster.tech/documentation-archive/v7.0.0
[using jhipster in development]: https://www.jhipster.tech/documentation-archive/v7.0.0/development/
[using docker and docker-compose]: https://www.jhipster.tech/documentation-archive/v7.0.0/docker-compose
[using jhipster in production]: https://www.jhipster.tech/documentation-archive/v7.0.0/production/
[running tests page]: https://www.jhipster.tech/documentation-archive/v7.0.0/running-tests/
[code quality page]: https://www.jhipster.tech/documentation-archive/v7.0.0/code-quality/
[setting up continuous integration]: https://www.jhipster.tech/documentation-archive/v7.0.0/setting-up-ci/
[jhipster 7.4.0 archive]: https://www.jhipster.tech/documentation-archive/v7.4.0
[using jhipster in development]: https://www.jhipster.tech/documentation-archive/v7.4.0/development/
[using docker and docker-compose]: https://www.jhipster.tech/documentation-archive/v7.4.0/docker-compose
[using jhipster in production]: https://www.jhipster.tech/documentation-archive/v7.4.0/production/
[running tests page]: https://www.jhipster.tech/documentation-archive/v7.4.0/running-tests/
[code quality page]: https://www.jhipster.tech/documentation-archive/v7.4.0/code-quality/
[setting up continuous integration]: https://www.jhipster.tech/documentation-archive/v7.4.0/setting-up-ci/
[node.js]: https://nodejs.org/
[npm]: https://www.npmjs.com/
[webpack]: https://webpack.github.io/
[browsersync]: https://www.browsersync.io/
[jest]: https://facebook.github.io/jest/
[jasmine]: https://jasmine.github.io/2.0/introduction.html
[protractor]: https://angular.github.io/protractor/
[leaflet]: https://leafletjs.com/
[definitelytyped]: https://definitelytyped.org/
31 changes: 20 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ plugins {
id "org.liquibase.gradle"
id "org.sonarqube"
id "io.spring.nohttp"
id "com.github.andygoossens.gradle-modernizer-plugin"
//jhipster-needle-gradle-plugins - JHipster will add additional gradle plugins here
}

Expand All @@ -31,7 +32,7 @@ description = ""

sourceCompatibility=11
targetCompatibility=11
assert System.properties["java.specification.version"] == "1.8" || "1.9" || "10" || "11" || "12" || "13" || "14" || "15"
assert System.properties["java.specification.version"] == "11" || "12" || "13" || "14" || "15" || "16" || "17"

apply from: "gradle/docker.gradle"
apply from: "gradle/sonar.gradle"
Expand Down Expand Up @@ -87,16 +88,21 @@ springBoot {
test {
useJUnitPlatform()
exclude "**/*IT*", "**/*IntTest*"

testLogging {
events 'FAILED', 'SKIPPED'
}
jvmArgs += '-Djava.security.egd=file:/dev/./urandom -Xmx256m'
// uncomment if the tests reports are not generated
// see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
// ignoreFailures true
reports.html.enabled = false
}

modernizer {
failOnViolations = true
includeTestClasses = true
}

task integrationTest(type: Test) {
environment "ADYEN_API_KEY", "test"
environment "ADYEN_MERCHANT_ACCOUNT", "test"
Expand All @@ -105,11 +111,10 @@ task integrationTest(type: Test) {
description = "Execute integration tests."
group = "verification"
include "**/*IT*", "**/*IntTest*"

testLogging {
events 'FAILED', 'SKIPPED'
}

jvmArgs += '-Djava.security.egd=file:/dev/./urandom -Xmx256m'
if (project.hasProperty('testcontainers')) {
environment 'spring.profiles.active', 'testcontainers'
}
Expand Down Expand Up @@ -186,7 +191,7 @@ configurations {
resolutionStrategy {
// Inherited version from Spring Boot can't be used because of regressions:
// To be removed as soon as spring-boot use the same version
force 'org.liquibase:liquibase-core:4.3.1'
force 'org.liquibase:liquibase-core:4.6.1'
}
}
}
Expand All @@ -206,7 +211,7 @@ dependencies {
// Use ", version: jhipsterDependenciesVersion, changing: true" if you want
// to use a SNAPSHOT release instead of a stable release
implementation group: "tech.jhipster", name: "jhipster-framework"
implementation group: "com.adyen", name: "adyen-java-api-library", version: "13.0.0"
implementation group: "com.adyen", name: "adyen-java-api-library", version: "17.2.0"
implementation "javax.annotation:javax.annotation-api"
implementation "org.springframework.boot:spring-boot-starter-cache"
implementation "io.dropwizard.metrics:metrics-core"
Expand Down Expand Up @@ -244,7 +249,6 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-thymeleaf"
implementation "org.zalando:problem-spring-web"
implementation "org.springframework.security:spring-security-config"

implementation "org.springframework.security:spring-security-data"
implementation "org.springframework.security:spring-security-web"
implementation "io.jsonwebtoken:jjwt-api"
Expand Down Expand Up @@ -272,6 +276,7 @@ dependencies {
testRuntimeOnly "com.tngtech.archunit:archunit-junit5-engine:${archunitJunit5Version}"
testImplementation "com.h2database:h2"
liquibaseRuntime "com.h2database:h2"
developmentOnly "org.springframework.boot:spring-boot-devtools:${springBootVersion}"
//jhipster-needle-gradle-dependency - JHipster will add additional dependencies here
}

Expand All @@ -292,15 +297,19 @@ task cleanResources(type: Delete) {
}

wrapper {
gradleVersion = "6.8.3"
gradleVersion = "7.0.2"
}


if (project.hasProperty("nodeInstall")) {
// Workaround node grade plugin not working on apple silicon https://github.com/node-gradle/gradle-node-plugin/issues/154
OperatingSystem os = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentOperatingSystem();
Architecture arch = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentArchitecture();
Boolean downloadNode = !os.isMacOsX() || arch.isAmd64()
node {
version = "14.16.0"
npmVersion = "7.6.3"
download = true
version = "14.18.1"
npmVersion = "8.1.4"
download = downloadNode
}
}
compileJava.dependsOn processResources
Expand Down
34 changes: 19 additions & 15 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@ rootProject.name=store
profile=dev

# Dependency versions
jhipsterDependenciesVersion=7.0.0
jhipsterDependenciesVersion=7.4.0
# The spring-boot version should match the one managed by
# https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/7.0.0
springBootVersion=2.4.4
# https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/7.4.0
springBootVersion=2.5.7
# The hibernate version should match the one managed by
# https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/2.4.4 -->
hibernateVersion=5.4.29.Final
# https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/2.5.7 -->
hibernateVersion=5.4.32.Final
mapstructVersion=1.4.2.Final
archunitJunit5Version=0.17.0
liquibaseHibernate5Version=4.3.1
archunitJunit5Version=0.22.0
liquibaseHibernate5Version=4.6.1
liquibaseTaskPrefix=liquibase



jaxbRuntimeVersion=2.3.3

# gradle plugin version
jibPluginVersion=2.8.0
gitPropertiesPluginVersion=2.2.4
gradleNodePluginVersion=3.0.1
liquibasePluginVersion=2.0.4
sonarqubePluginVersion=3.1.1
springNoHttpPluginVersion=0.0.5.RELEASE
checkstyleVersion=8.40

jibPluginVersion=3.1.4
gitPropertiesPluginVersion=2.3.1
gradleNodePluginVersion=3.1.1
liquibasePluginVersion=2.1.0
sonarqubePluginVersion=3.3
noHttpCheckstyleVersion=0.0.10
checkstyleVersion=9.1
modernizerPluginVersion=1.6.1
# jhipster-needle-gradle-property - JHipster will add additional properties here

## below are some of the gradle performance improvement settings that can be used as required, these are not enabled by default
Expand Down Expand Up @@ -57,3 +58,6 @@ checkstyleVersion=8.40
## uncomment the below line to enable the selective mode

#org.gradle.configureondemand=true

## Install and use a local version of node and npm.
nodeInstall
2 changes: 1 addition & 1 deletion gradle/docker.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
jib {
from {
image = "adoptopenjdk:11-jre-hotspot"
image = "eclipse-temurin:11-jre-focal"
}
to {
image = "store:latest"
Expand Down
15 changes: 14 additions & 1 deletion gradle/profile_dev.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,30 @@ bootRun {
}

task webapp(type: NpmTask) {
inputs.property('appVersion', project.version)
inputs.files("package-lock.json")
.withPropertyName('package-lock')
.withPathSensitivity(PathSensitivity.RELATIVE)
inputs.files("build.gradle")
.withPropertyName('build.gradle')
.withPathSensitivity(PathSensitivity.RELATIVE)
inputs.dir("src/main/webapp/")
.withPropertyName("webapp-source-dir")
.withPathSensitivity(PathSensitivity.RELATIVE)
inputs.files("tsconfig.json")
.withPropertyName("tsconfig")
.withPathSensitivity(PathSensitivity.RELATIVE)

def webpackDevFiles = fileTree("webpack/")
webpackDevFiles.exclude("webpack.prod.js")
inputs.files(webpackDevFiles)

.withPropertyName("webpack-dir")
.withPathSensitivity(PathSensitivity.RELATIVE)
outputs.dir("build/resources/main/static/")
.withPropertyName("webapp-build-dir")

dependsOn npmInstall

args = ["run", "webapp:build"]
environment = [APP_VERSION: project.version]
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/profile_prod.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ bootRun {
args = []
}

task webapp_test(type: NpmTask, dependsOn: "npmInstall") {
task webapp_test(type: NpmTask, dependsOn: "npm_install") {
args = ["run", "webapp:test"]
}

task webapp(type: NpmTask, dependsOn: "npmInstall") {
task webapp(type: NpmTask, dependsOn: "npm_install") {
args = ["run", "webapp:prod"]
environment = [APP_VERSION: project.version]
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/sonar.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jacoco {
toolVersion = "0.8.6"
toolVersion = "0.8.7"
}

jacocoTestReport {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading