Skip to content

Commit 22bb817

Browse files
Fix vaadin version not appearing in the gradle config doc
1 parent 1887e8f commit 22bb817

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

articles/flow/configuration/gradle.adoc

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ meta-description: Learn how to set up and use Gradle for building and managing V
66
order: 131
77
---
88

9+
include::{articles}/_vaadin-version.adoc[]
10+
911
= Gradle Configuration Properties
1012

1113
--
@@ -21,23 +23,23 @@ For information about using Gradle, see the link:https://docs.gradle.org/current
2123

2224
.Requirements
2325
[NOTE]
24-
The Vaadin Gradle plugin requires Java SDK 17 or later, Gradle 8.5 or later.
25-
It will install Node.js and npm automatically when running the build for the first time.
26+
The Vaadin Gradle plugin requires Java SDK 17 or later, Gradle 8.7 or later.
27+
It will install Node.js and npm automatically when running the build for the first time if they are missing or the installed version is below the minimum required.
2628
If you plan to use Vaadin's Gradle-based starter projects, there's no need to install Gradle on your machine. A Gradle Wrapper script is included in starter projects. It manages locally the download and execution of Gradle for your project. For more information on using Gradle Wrapper, see the https://docs.gradle.org/current/userguide/gradle_wrapper.html[Official Gradle Documentation].
2729

2830

2931
[[build-file.vaadin-options]]
3032
=== Vaadin Plugin Configuration
3133

32-
Vaadin Gradle plugin options are configured in a `vaadin` block. For development, the block is usually like this:
34+
Vaadin Gradle plugin options are configured in a `vaadin` block. An example configuration could be like this:
3335

3436
----
3537
vaadin {
36-
optimizeBundle = false
38+
frontendHotdeploy = true
3739
}
3840
----
3941

40-
If the parameter is `true`, the frontend bundle is optimized for all supported browsers, but the compilation is much slower. For configuration options, see <<all-options,plugin configuration options>>
42+
If the parameter is `true`, it enables development using the frontend development server instead of an application bundle. This applies only to development mode.
4143

4244

4345
[[build-file.repositories]]
@@ -48,6 +50,7 @@ The `repositories` section defines the locations to search for packages. The rep
4850
----
4951
repositories {
5052
mavenCentral()
53+
mavenLocal()
5154
maven { url = "https://maven.vaadin.com/vaadin-addons" }
5255
maven { url "https://maven.vaadin.com/vaadin-prereleases" }
5356
maven { url "https://plugins.gradle.org/m2/" }
@@ -57,6 +60,7 @@ repositories {
5760
The example above shows configured repositories in the following order:
5861

5962
* *Maven central* (required) - contains Vaadin and a lot of other public libraries
63+
* *Maven local* - Repository which looks in the local Maven cache for dependencies.
6064
* repository for *Vaadin add-ons*
6165
* repository for *Vaadin pre-releases* - not recommended for production environments
6266
* *Gradle plugin repository* - only necessary when using Gradle community plugins, which are not available through Maven central
@@ -69,21 +73,21 @@ You can use any Gradle repository definitions in the block. See https://docs.gra
6973

7074
You'll need to add the `vaadin-core` or `vaadin` library as a Java dependency. You would do that like so:
7175

76+
[source,subs="+attributes"]
7277
----
7378
dependencies {
74-
implementation "com.vaadin:vaadin-core:24.+"
79+
implementation "com.vaadin:vaadin-core:{vaadin-version}"
7580
}
7681
----
7782

78-
When you specify a version of `24.+`, you're choosing to use the latest version of Vaadin. However, you can also specify the exact version. See https://docs.gradle.org/current/userguide/declaring_dependencies.html[Declaring Dependencies] in the Gradle documentation for more details.
7983

8084
[[compiling.tasks]]
8185
=== Vaadin Tasks
8286

8387
The Vaadin-related tasks handled by the plugin are as follows:
8488

8589
`vaadinPrepareFrontend`::
86-
This checks that Node.js and `npm` are installed, copies frontend resources, and creates or updates the [filename]`package.json` and Vite configuration files (i.e., [filename]`vite.config.ts` and [filename]`vite.generated.ts`). The frontend resources are inside `.jar` dependencies: they're copied to `node_modules`.
90+
This step verifies that Node.js and `npm` are installed, copies the frontend resources, and, if needed, creates or updates the [filename]`package.json` file and Vite configuration files (i.e., [filename]`vite.config.ts` and [filename]`vite.generated.ts`). The frontend resources are located within `.jar` dependencies and are copied to `src/main/frontend/generated/jar-resources`.
8791

8892
`vaadinBuildFrontend`::
8993
This builds the frontend bundle with the `Vite` utility. Vaadin frontend resources (e.g., HTML, JavaScript, CSS, and images) are bundled to optimize loading the frontend. This task isn't executed automatically on the `build` and other targets, so you'll need to run it, explicitly.

articles/getting-started/start/alternatives/gradle.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For information about using Gradle, see the link:https://docs.gradle.org/current
2323

2424
.Requirements
2525
[NOTE]
26-
The Vaadin Gradle plugin requires Java SDK 17 or later, Gradle 8.5 or later. It will install Node.js and npm automatically when running the build for the first time.
26+
The Vaadin Gradle plugin requires Java SDK 17 or later, Gradle 8.7 or later. It will install Node.js and npm automatically when running the build for the first time if they are missing or the installed version is below the minimum required.
2727
If you plan to use Vaadin's Gradle-based starter projects, there's no need to install Gradle on your machine. A Gradle Wrapper script is included in starter projects. It manages locally the download and execution of Gradle for your project. For more information on using Gradle Wrapper, see the https://docs.gradle.org/current/userguide/gradle_wrapper.html[Official Gradle Documentation].
2828

2929

0 commit comments

Comments
 (0)