Skip to content

Commit 74c7270

Browse files
Merge pull request #202 from xdev-software/develop
Release v2.0.3
2 parents 4bfa272 + 78e4fbb commit 74c7270

File tree

24 files changed

+244
-210
lines changed

24 files changed

+244
-210
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ env:
88
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
99
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo
1010

11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
1115
jobs:
1216
check_code: # Validates the code (see develop.yml)
1317
runs-on: ubuntu-latest
@@ -70,8 +74,8 @@ jobs:
7074
id: version
7175
run: |
7276
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
73-
echo "::set-output name=release::$version"
74-
echo "::set-output name=releasenumber::${version//[!0-9]/}"
77+
echo "release=$version" >> $GITHUB_OUTPUT
78+
echo "releasenumber=${version//[!0-9]/}" >> $GITHUB_OUTPUT
7579
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
7680

7781
- name: Commit and Push
@@ -84,9 +88,7 @@ jobs:
8488
8589
- name: Create Release
8690
id: create_release
87-
uses: actions/create-release@v1
88-
env:
89-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
uses: shogo82148/actions-create-release@v1
9092
with:
9193
tag_name: v${{ steps.version.outputs.release }}
9294
release_name: v${{ steps.version.outputs.release }}
@@ -104,8 +106,6 @@ jobs:
104106
<version>${{ steps.version.outputs.release }}</version>
105107
</dependency>
106108
```
107-
draft: false
108-
prerelease: false
109109
110110
publish_central: # Publish the code to central
111111
runs-on: ubuntu-latest
@@ -170,13 +170,11 @@ jobs:
170170
- name: Get version
171171
id: version
172172
run: |
173-
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
173+
echo "release=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
174174
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
175175

176176
- name: Upload Release Asset
177-
uses: actions/upload-release-asset@v1
178-
env:
179-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177+
uses: shogo82148/actions-upload-release-asset@v1
180178
with:
181179
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
182180
asset_path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/${{ env.PRIMARY_MAVEN_MODULE }}-${{ steps.version.outputs.release }}.zip
@@ -270,7 +268,6 @@ jobs:
270268
- name: pull-request
271269
uses: repo-sync/pull-request@v2
272270
with:
273-
github_token: ${{ secrets.GITHUB_TOKEN }}
274271
destination_branch: "develop"
275272
pr_title: "Sync back"
276273
pr_body: "An automated PR to sync changes back"

.github/workflows/sonar.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Sonar
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ develop ]
7+
paths-ignore:
8+
- '**.md'
9+
- 'assets/**'
10+
- 'config/**'
11+
pull_request:
12+
types: [opened, synchronize, reopened]
13+
paths-ignore:
14+
- '**.md'
15+
- 'assets/**'
16+
- 'config/**'
17+
18+
env:
19+
SONARCLOUD_ORG: ${{ github.event.organization.login }}
20+
SONARCLOUD_HOST: https://sonarcloud.io
21+
22+
jobs:
23+
sonar:
24+
name: SonarCloud Scan
25+
runs-on: ubuntu-latest
26+
# Dependabot PRs have no access to secrets (SONAR_TOKEN) -> Ignore them
27+
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'dependabot/') }}
28+
steps:
29+
- uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
32+
33+
- name: Set up JDK 11
34+
uses: actions/setup-java@v3
35+
with:
36+
distribution: 'temurin'
37+
java-version: 11
38+
39+
- name: Cache SonarCloud packages
40+
uses: actions/cache@v3
41+
with:
42+
path: ~/.sonar/cache
43+
key: ${{ runner.os }}-sonar
44+
restore-keys: ${{ runner.os }}-sonar
45+
46+
- name: Cache Maven packages
47+
uses: actions/cache@v3
48+
with:
49+
path: ~/.m2
50+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
51+
restore-keys: ${{ runner.os }}-m2
52+
53+
- name: Build with Maven
54+
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=${{ env.SONARCLOUD_ORG }}_${{ github.event.repository.name }} -Dsonar.organization=${{ env.SONARCLOUD_ORG }} -Dsonar.host.url=${{ env.SONARCLOUD_HOST }}
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
57+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/update-from-template.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
echo "Deleting origin branch that contains the updates - if present"
6161
git push -f origin --delete ${{ env.UPDATE_BRANCH }} || true
6262
63-
echo "::set-output name=abort::1"
63+
echo "abort=1" >> $GITHUB_OUTPUT
6464
exit 0
6565
fi
6666
@@ -76,9 +76,9 @@ jobs:
7676
echo "Getting current branch"
7777
current_branch=$(git branch --show-current)
7878
echo "Current branch is $current_branch"
79-
echo "::set-output name=current_branch::$current_branch"
79+
echo "current_branch=$current_branch" >> $GITHUB_OUTPUT
8080
81-
echo "::set-output name=abort::0"
81+
echo "abort=0" >> $GITHUB_OUTPUT
8282
8383
- name: pull-request
8484
uses: repo-sync/pull-request@v2

.idea/codeStyles/Project.xml

Lines changed: 15 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.0.3
2+
* Updated dependencies
3+
* Fixed problem with setting lon/lan in LMarker
4+
* Added constructors for LMap
5+
16
## 2.0.2
27
* Updated dependencies
38

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/leafletmap-for-vaadin)
22
[![Latest version](https://img.shields.io/maven-central/v/com.xdev-software/vaadin-maps-leaflet-flow)](https://mvnrepository.com/artifact/com.xdev-software/vaadin-maps-leaflet-flow)
3-
[![Build](https://img.shields.io/github/workflow/status/xdev-software/vaadin-maps-leaflet-flow/Check%20Build/develop)](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
3+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/vaadin-maps-leaflet-flow/checkBuild.yml?branch=develop)](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
4+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_vaadin-maps-leaflet-flow&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_vaadin-maps-leaflet-flow)
45
![Vaadin 23+](https://img.shields.io/badge/Vaadin%20Platform/Flow-23+-00b4f0.svg)
56

67
# vaadin-maps-leaflet-flow
@@ -39,10 +40,10 @@ Vaadin Flow Java API for [Leaflet Maps](https://leafletjs.com/) Component
3940
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/vaadin-maps-leaflet-flow/dependencies/)
4041

4142

42-
## Releasing [![Build](https://img.shields.io/github/workflow/status/xdev-software/vaadin-maps-leaflet-flow/Release?label=Release)](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions/workflows/release.yml)
43+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/vaadin-maps-leaflet-flow/release.yml?branch=master)](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions/workflows/release.yml)
4344

4445
Before releasing:
45-
* Consider doing a [test-deployment](https://github.com/xdev-software/vaadin-addon-template/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
46+
* Consider doing a [test-deployment](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
4647
* Check the [changelog](CHANGELOG.md)
4748

4849
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

SECURITY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/vaadin-maps-leaflet-flow/security/advisories/new).

vaadin-maps-leaflet-flow-demo/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
3434

3535
<!-- Dependency-Versions -->
36-
<vaadin.version>23.2.4</vaadin.version>
36+
<vaadin.version>23.3.4</vaadin.version>
3737
</properties>
3838

3939

@@ -73,7 +73,7 @@
7373
<plugin>
7474
<groupId>org.eclipse.jetty</groupId>
7575
<artifactId>jetty-maven-plugin</artifactId>
76-
<version>10.0.12</version>
76+
<version>10.0.13</version>
7777
<configuration>
7878
<scan>1</scan>
7979
</configuration>

vaadin-maps-leaflet-flow/pom.xml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,14 @@
4242
</licenses>
4343

4444
<properties>
45-
<license.licenseName>apache_v2</license.licenseName>
46-
4745
<javaVersion>11</javaVersion>
4846
<maven.compiler.release>${javaVersion}</maven.compiler.release>
4947

5048
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5149
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5250

5351
<!-- Dependency-Versions -->
54-
<vaadin.version>23.2.4</vaadin.version>
52+
<vaadin.version>23.3.4</vaadin.version>
5553
</properties>
5654

5755
<dependencyManagement>
@@ -110,7 +108,7 @@
110108
<dependency>
111109
<groupId>com.fasterxml.jackson.core</groupId>
112110
<artifactId>jackson-databind</artifactId>
113-
<version>2.13.4.2</version>
111+
<version>2.14.1</version>
114112
</dependency>
115113

116114
<dependency>
@@ -123,22 +121,30 @@
123121
<build>
124122
<plugins>
125123
<plugin>
126-
<groupId>org.codehaus.mojo</groupId>
124+
<groupId>com.mycila</groupId>
127125
<artifactId>license-maven-plugin</artifactId>
128-
<version>2.0.0</version>
126+
<version>4.1</version>
127+
<configuration>
128+
<properties>
129+
<email>${project.organization.url}</email>
130+
</properties>
131+
<licenseSets>
132+
<licenseSet>
133+
<header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
134+
<includes>
135+
<include>src/main/java/**</include>
136+
<include>src/test/java/**</include>
137+
</includes>
138+
</licenseSet>
139+
</licenseSets>
140+
</configuration>
129141
<executions>
130142
<execution>
131143
<id>first</id>
132144
<goals>
133-
<goal>update-file-header</goal>
145+
<goal>format</goal>
134146
</goals>
135147
<phase>process-sources</phase>
136-
<configuration>
137-
<roots>
138-
<root>src/main/java</root>
139-
<root>src/test/java</root>
140-
</roots>
141-
</configuration>
142148
</execution>
143149
</executions>
144150
</plugin>

vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/flow/LMap.java

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
2-
package software.xdev.vaadin.maps.leaflet.flow;
3-
4-
/*-
5-
* #%L
6-
* vaadin-maps-leaflet-flow
7-
* %%
8-
* Copyright (C) 2019 XDEV Software
9-
* %%
1+
/*
2+
* Copyright © 2019 XDEV Software (https://xdev.software/en)
3+
*
104
* Licensed under the Apache License, Version 2.0 (the "License");
115
* you may not use this file except in compliance with the License.
126
* You may obtain a copy of the License at
137
*
14-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
159
*
1610
* Unless required by applicable law or agreed to in writing, software
1711
* distributed under the License is distributed on an "AS IS" BASIS,
1812
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1913
* See the License for the specific language governing permissions and
2014
* limitations under the License.
21-
* #L%
2215
*/
2316

17+
package software.xdev.vaadin.maps.leaflet.flow;
18+
19+
20+
2421
import static org.apache.commons.text.StringEscapeUtils.escapeEcmaScript;
2522

2623
import java.util.ArrayList;
@@ -88,6 +85,18 @@ public LMap(final double lat, final double lon, final int zoom)
8885
this.setViewPoint(this.center);
8986
}
9087

88+
public LMap(final double lat, final double lon, final int zoom, final LTileLayer tileLayer)
89+
{
90+
this(lat, lon, zoom);
91+
this.setTileLayer(tileLayer);
92+
}
93+
94+
public LMap(final LTileLayer tileLayer)
95+
{
96+
this();
97+
this.setTileLayer(tileLayer);
98+
}
99+
91100
public void setZoom(final int zoom)
92101
{
93102
this.getElement().executeJs(CLIENT_MAP + ".setZoom(" + zoom + ");");

0 commit comments

Comments
 (0)