Skip to content

Commit b025c1e

Browse files
authored
Fix source 6 warnings (#68)
* Remove target 1.6, ignore warnings about deprecated options Signed-off-by: Ivan Santiago Paunovic <[email protected]> * Only add flags if they weren't specified internally Signed-off-by: Ivan Santiago Paunovic <[email protected]> * Don't pass java compile flags in CMake, instead do that in CI Signed-off-by: Ivan Santiago Paunovic <[email protected]> * Build both with java 6 and default java version Signed-off-by: Ivan Santiago Paunovic <[email protected]>
1 parent f6fd54b commit b025c1e

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

.github/workflows/build_and_test.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,28 @@ on: [push]
44

55
jobs:
66
build_and_test:
7-
runs-on: ubuntu-20.04
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
rosdistro: [rolling]
11+
os: [ubuntu-20.04]
12+
java_version: [6, default]
13+
include:
14+
- java_version: 6
15+
colcon_defaults: |
16+
{
17+
"build": {
18+
"cmake-args": [
19+
"-DCMAKE_JAVA_COMPILE_FLAGS=-source;1.6;-target;1.6;-Xlint:-options",
20+
"--no-warn-unused-cli"
21+
]
22+
}
23+
}
24+
- java_version: default
25+
colcon_defaults: |
26+
{
27+
}
28+
runs-on: ${{matrix.os}}
829
steps:
930
- name: Install Java
1031
run: |
@@ -13,13 +34,13 @@ jobs:
1334
- uses: actions/checkout@v2
1435
- uses: ros-tooling/[email protected]
1536
with:
16-
required-ros-distributions: rolling
37+
required-ros-distributions: ${{matrix.rosdistro}}
1738
- uses: ros-tooling/action-ros-ci@master
1839
with:
1940
package-name: rosidl_generator_java rcljava_common rcljava
20-
target-ros2-distro: rolling
41+
target-ros2-distro: ${{matrix.rosdistro}}
2142
vcs-repo-file-url: ${{ github.workspace }}/ros2_java_desktop.repos
22-
43+
colcon-defaults: ${{matrix.colcon_defaults}}
2344
# build_android:
2445
# runs-on: ubuntu-18.04
2546
# steps:

rcljava/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ if(NOT WIN32)
3838
add_compile_options(-Wall -Wextra -Wpedantic)
3939
endif()
4040

41-
set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.6" "-target" "1.6")
42-
4341
include_directories(include)
4442

4543
function(set_properties _target_name _build_type)

rcljava_common/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ if(NOT WIN32)
3131
add_compile_options(-Wall -Wextra -Wpedantic)
3232
endif()
3333

34-
set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.6" "-target" "1.6")
35-
3634
set(${PROJECT_NAME}_java_sources
3735
"src/main/java/org/ros2/rcljava/common/JNIUtils.java"
3836
"src/main/java/org/ros2/rcljava/exceptions/RCLException.java"

0 commit comments

Comments
 (0)