You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/flow/configuration/gradle.adoc
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ meta-description: Learn how to set up and use Gradle for building and managing V
6
6
order: 131
7
7
---
8
8
9
+
include::{articles}/_vaadin-version.adoc[]
10
+
9
11
= Gradle Configuration Properties
10
12
11
13
--
@@ -21,23 +23,23 @@ For information about using Gradle, see the link:https://docs.gradle.org/current
21
23
22
24
.Requirements
23
25
[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.
26
28
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].
27
29
28
30
29
31
[[build-file.vaadin-options]]
30
32
=== Vaadin Plugin Configuration
31
33
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:
33
35
34
36
----
35
37
vaadin {
36
-
optimizeBundle = false
38
+
frontendHotdeploy = true
37
39
}
38
40
----
39
41
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.
41
43
42
44
43
45
[[build-file.repositories]]
@@ -48,6 +50,7 @@ The `repositories` section defines the locations to search for packages. The rep
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.
79
83
80
84
[[compiling.tasks]]
81
85
=== Vaadin Tasks
82
86
83
87
The Vaadin-related tasks handled by the plugin are as follows:
84
88
85
89
`vaadinPrepareFrontend`::
86
-
This checks that Node.js and `npm` are installed, copies frontend resources, andcreates 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`.
87
91
88
92
`vaadinBuildFrontend`::
89
93
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.
Copy file name to clipboardExpand all lines: articles/getting-started/start/alternatives/gradle.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ For information about using Gradle, see the link:https://docs.gradle.org/current
23
23
24
24
.Requirements
25
25
[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.
27
27
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].
0 commit comments