Skip to content

Commit

Permalink
Manually install high level API before building
Browse files Browse the repository at this point in the history
  • Loading branch information
dorian-burihabwa-sonarsource committed Apr 16, 2024
1 parent e4175e8 commit 9cbf078
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ build_task:
DEPLOY_PULL_REQUEST: true
build_script:
- source cirrus-env BUILD-PRIVATE
- ./cirrus/install-dependencies.sh
- regular_gradle_build_deploy_analyze -x test -x sonar
on_failure:
error_log_artifacts:
Expand All @@ -133,6 +134,7 @@ build_test_analyze_task:
DEPLOY_PULL_REQUEST: true
build_script:
- source cirrus-env BUILD-PRIVATE
- ./cirrus/install-dependencies.sh
- regular_gradle_build_deploy_analyze -x artifactoryPublish
on_failure:
error_log_artifacts:
Expand Down
30 changes: 30 additions & 0 deletions cirrus/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash

set -euox pipefail

readonly REPOSITORY=https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies

main() {
local url="${REPOSITORY}/org/jetbrains/kotlin/high-level-api-fir-for-ide/2.0.0-RC1/high-level-api-fir-for-ide-2.0.0-RC1.jar"
local destination=$(basename "${url}")
# Download
if [[ ! -f "${destination}" ]]; then
curl \
--location \
--silent \
--output "${destination}" \
"${url}"
fi
# Install in local repository
local absolute_path="$(cd "$(dirname "$1")" && pwd)/$(basename "${destination}")"
mvn install:install-file \
-Dfile="${absolute_path}" \
-DgroupId=org.jetbrains.kotlin \
-DartifactId=high-level-api-fir-for-ide \
-Dversion=2.0.0-RC1 \
-Dpackaging=jar
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
main "$@"
fi

0 comments on commit 9cbf078

Please sign in to comment.