Skip to content

Commit c70ee2c

Browse files
authored
Maven Project. Fail on warnings (#5258)
A script for extended CI check to not miss issues like https://youtrack.jetbrains.com/issue/CMP-7738/Compose-fails-to-sync-in-Bazel ## Testing ``` ./gradlew publishComposeJbToMavenLocal ``` ``` ./check.sh -Dkotlin.version=2.1.0 -Dcompose.version=9999.0.0-SNAPSHOT ``` doesn't fail on the latest jb-main, fails on 1.8.0-alpha04 ## Release Notes N/A
1 parent bf60a6e commit c70ee2c

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The purpose of this test project is to check if Compose Multiplatform is resolvable via pom files, which are used by JPS, which is used by IntelliJ
22

33
```
4-
mvn install exec:java -Dexec.mainClass="MainKt" -Dkotlin.version=2.1.0 -Dcompose.version=1.8.0-alpha02
4+
./check.sh -Dkotlin.version=2.1.0 -Dcompose.version=1.8.0-alpha02
55
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
set -o pipefail
4+
5+
tempfile=$(mktemp)
6+
7+
# Pipe output to the file and terminal
8+
if ! mvn clean install exec:java -Dexec.mainClass="MainKt" "$@" | tee "$tempfile"; then
9+
exit 1
10+
fi
11+
12+
# For failing on warnings like
13+
# [WARNING] The POM for org.jetbrains.kotlin:kotlin-stdlib:jar:unspecified is missing, no dependency information available
14+
#
15+
# There is no a flag in Maven to fail on warnings in dependency resolution
16+
17+
if grep -q "\[WARNING\]" "$tempfile"; then
18+
echo "[ERROR] Warnings found"
19+
exit 1
20+
fi

0 commit comments

Comments
 (0)