Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into spring-boot-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Jan 28, 2025
2 parents 0da6170 + ce95490 commit 27729ac
Show file tree
Hide file tree
Showing 234 changed files with 413 additions and 389 deletions.
2 changes: 1 addition & 1 deletion .blueprint/cli/commands.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
Expand Down
2 changes: 1 addition & 1 deletion .blueprint/generate-sample/command.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
Expand Down
2 changes: 1 addition & 1 deletion .blueprint/synchronize/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
Expand Down
6 changes: 5 additions & 1 deletion .blueprint/synchronize/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
Expand Down Expand Up @@ -50,13 +50,17 @@ export default class SynchronizeGenerator extends BaseGenerator {
.replaceAll(';\n', '\n')
.replaceAll('\nimport static ', '\nimport ')
.replaceAll('public class ', 'class ')
.replaceAll('public abstract class ', 'abstract class ')
.replaceAll('new ', '')
.replaceAll('::class', '::class.java')
.replaceAll('.class', '::class')
.replaceAll(/ (?:extends|implements) (\w+)/g, ' : $1')
.replaceAll(/ (?:extends|implements) /g, ' : ')
.replaceAll(/@Override\n(\s*)/g, 'override ')
.replaceAll(/\n( {4})(private |)?(?:final )?(\w+) (\w+)(\n| = )/g, '\n$1$2lateinit var $4: $3$5')
.replaceAll(/private static final (\w+) /g, 'private val ')
.replaceAll(/(?:public |protected )?(\w+) (\w+)\((.*)\) {/g, 'fun $2($3): $1 {')
.replaceAll(' {}\n', '\n')
.replaceAll(': void', ''),
);
}),
Expand Down
2 changes: 1 addition & 1 deletion .blueprint/synchronize/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copyright-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
grep -rlZE "Copyright ([0-9]+)-$CURRENT_YEAR" . | xargs -0 sed -i -E "s/Copyright ([0-9]+)-$CURRENT_YEAR/Copyright \1-$NEW_YEAR/g"
# Create PR
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Update copyright headers'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Expand Down
2 changes: 1 addition & 1 deletion cli/logo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
Expand Down
4 changes: 2 additions & 2 deletions generators/detekt/templates/gradle/detekt.gradle.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
2 changes: 1 addition & 1 deletion generators/kotlin/__snapshots__/generator.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ exports[`SubGenerator kotlin of kotlin JHipster blueprint > maven > should match
{
"dependencies": [
{
"artifactId": "kotlin-stdlib-jdk8",
"artifactId": "kotlin-stdlib",
"groupId": "org.jetbrains.kotlin",
},
{
Expand Down
2 changes: 1 addition & 1 deletion generators/kotlin/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ tasks.withType(org.jetbrains.kotlin.gradle.internal.KaptGenerateStubsTask.class)
source.addJavaDefinition({
versions: [{ name: 'kotlin', version: application.javaDependencies.kotlin }],
dependencies: [
{ groupId: 'org.jetbrains.kotlin', artifactId: 'kotlin-stdlib-jdk8' },
{ groupId: 'org.jetbrains.kotlin', artifactId: 'kotlin-stdlib' },
{ groupId: 'org.jetbrains.kotlin', artifactId: 'kotlin-reflect' },
{ groupId: 'org.jetbrains.kotlin', artifactId: 'kotlin-test-junit', scope: 'test' },
{
Expand Down
6 changes: 3 additions & 3 deletions generators/kotlin/templates/gradle/kotlin.gradle.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -19,7 +19,7 @@
import org.gradle.internal.os.OperatingSystem

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-reflect"

<%_ if (reactive) { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This file is part of the JHipster project, see https://jhipster.github.io/
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
2 changes: 1 addition & 1 deletion generators/ktlint/resources/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[libraries]
ktlint-cli = { module = 'com.pinterest.ktlint:ktlint-cli', version = '1.5.0' }

ktlint-maven = { module = 'com.github.gantsign.maven:ktlint-maven-plugin', version = '3.4.0' }
ktlint-maven = { module = 'com.github.gantsign.maven:ktlint-maven-plugin', version = '3.5.0' }

[plugins]
ktlint-gradle = { id = 'org.jlleitschuh.gradle.ktlint', version = '12.1.2' }
4 changes: 2 additions & 2 deletions generators/ktlint/templates/gradle/ktlint.gradle.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
11 changes: 11 additions & 0 deletions generators/migration/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ export default class extends BaseApplicationGenerator {
file.contents = Buffer.from(file.contents.toString().replaceAll('jakarta.', 'javax.'));
}),
);

this.queueTransformStream(
{
name: 'reverting kt files to javax',
filter: file => file.path.endsWith('.kt'),
refresh: false,
},
passthrough(file => {
file.contents = Buffer.from(file.contents.toString().replaceAll('import jakarta.', 'import javax.'));
}),
);
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion generators/spring-boot-v2/migration.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
Expand Down
13 changes: 11 additions & 2 deletions generators/spring-boot-v2/preparing-migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,19 @@ const javaDependenciesOverrides = {
};

export const migrateApplicationTask = asWritingTask(async function ({ application, applicationDefaults }) {
// Downgrade elasticsearch to 7.17.4
const { cassandra, mongodb, postgresql, couchbase, mariadb, mysql, neo4j, mssql, kafka } = jhipster7DockerContainers;
// Downgrade db and elasticsearch
Object.assign(application.dockerContainers, {
elasticsearchTag: ELASTICSEARCH_VERSION,
elasticsearch: `${DOCKER_ELASTICSEARCH_CONTAINER}:${ELASTICSEARCH_VERSION}`,
cassandra,
mongodb,
postgresql,
couchbase,
mariadb,
mysql,
neo4j,
mssql,
});

Object.assign(application.javaDependencies, javaDependenciesOverrides);
Expand All @@ -88,7 +97,7 @@ export const migrateApplicationTask = asWritingTask(async function ({ applicatio
});

const dockerContainersVersions = Object.fromEntries(
Object.entries({ ...application.dockerContainers, ...jhipster7DockerContainers }).map(([containerName, container]) => [
Object.entries({ ...application.dockerContainers, kafka }).map(([containerName, container]) => [
`DOCKER_${this._.snakeCase(containerName).toUpperCase().replace('_4_', '4')}`,
container,
]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://jhipster.github.io/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://jhipster.github.io/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://jhipster.github.io/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://jhipster.github.io/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
This file is part of the JHipster project, see https://jhipster.github.io/
for more information.
Licensed under the Apache License, Version 2.0 (the "
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Loading

0 comments on commit 27729ac

Please sign in to comment.