Browse Source

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
pull/5262/head
Igor Demin 9 months ago committed by GitHub
parent
commit
c70ee2ca62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ci/templates/maven-test-project/README.md
  2. 20
      ci/templates/maven-test-project/check.sh

2
ci/templates/maven-test-project/README.md

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
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
```
mvn install exec:java -Dexec.mainClass="MainKt" -Dkotlin.version=2.1.0 -Dcompose.version=1.8.0-alpha02
./check.sh -Dkotlin.version=2.1.0 -Dcompose.version=1.8.0-alpha02
```

20
ci/templates/maven-test-project/check.sh

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
#!/bin/bash
set -o pipefail
tempfile=$(mktemp)
# Pipe output to the file and terminal
if ! mvn clean install exec:java -Dexec.mainClass="MainKt" "$@" | tee "$tempfile"; then
exit 1
fi
# For failing on warnings like
# [WARNING] The POM for org.jetbrains.kotlin:kotlin-stdlib:jar:unspecified is missing, no dependency information available
#
# There is no a flag in Maven to fail on warnings in dependency resolution
if grep -q "\[WARNING\]" "$tempfile"; then
echo "[ERROR] Warnings found"
exit 1
fi
Loading…
Cancel
Save