variables: GRADLE_OPTS: "-Dorg.gradle.daemon=false" default: image: gradle:jdk18 before_script: - export GRADLE_USER_HOME=`pwd`/.gradle - export TIMESTAMP=$(date -d "$CI_PIPELINE_CREATED_AT" +%s) build_test: stage: build script: - gradle --build-cache :exportMetadata -Ppublic -Ptimestamp=$TIMESTAMP artifacts: paths: - version.json expire_in: 2 days build_platform_jars: stage: build script: - gradle --build-cache :launcher-dist:build -Pflavor=fat -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache :launcher-dist:build -Pflavor=windows -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache :launcher-dist:build -Pflavor=linux -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache :launcher-dist:build -Pflavor=macos -Ppublic -Ptimestamp=$TIMESTAMP - for f in launcher-dist/build/libs/Inceptum-*-*-*.jar; do mv "$f" "Inceptum-${f##*-}";done - mv Inceptum-fat.jar Inceptum.jar artifacts: paths: - launcher-dist/build/libs - Inceptum-*.jar - Inceptum.jar expire_in: 2 days build_wrapper: stage: build script: - gradle --build-cache :wrapper:build -Pflavor=windows -Ppublic -Ptimestamp=$TIMESTAMP - cp wrapper/build/libs/*.exe wrapper.exe - cp wrapper/build/libs/*-all.jar wrapper.jar artifacts: paths: - wrapper/build/libs - wrapper.jar - wrapper.exe expire_in: 2 days publish_debug: stage: deploy script: - gradle --build-cache build publish -Pflavor=maven -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache build :launcher-dist:publish -Pflavor=fat -Pdist.platformOnly -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache build :launcher-dist:publish -Pflavor=windows -Pdist.platformOnly -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache build :launcher-dist:publish -Pflavor=linux -Pdist.platformOnly -Ppublic -Ptimestamp=$TIMESTAMP - gradle --build-cache build :launcher-dist:publish -Pflavor=macos -Pdist.platformOnly -Ppublic -Ptimestamp=$TIMESTAMP only: - master publish_release: rules: - if: $CI_COMMIT_TAG && '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^master/' stage: deploy script: - gradle --build-cache build publish -Pflavor=maven -Ppublic -Prelease - gradle --build-cache build :launcher-dist:publish -Pflavor=fat -Pdist.platformOnly -Ppublic -Prelease - gradle --build-cache build :launcher-dist:publish -Pflavor=windows -Pdist.platformOnly -Ppublic -Prelease - gradle --build-cache build :launcher-dist:publish -Pflavor=linux -Pdist.platformOnly -Ppublic -Prelease - gradle --build-cache build :launcher-dist:publish -Pflavor=macos -Pdist.platformOnly -Ppublic -Prelease portable: stage: deploy image: archlinux:latest script: - pacman -Sy p7zip curl jq --noconfirm - mkdir -p portable/run/libraries/io/gitlab/jfronny/inceptum/Inceptum - mkdir -p portable/jvm - cp wrapper.jar portable/ - main="$(find build/libs/ -type f -iname "Inceptum-*-windows.jar")" - dir="${main##*/Inceptum-}" - dir="portable/run/libraries/io/gitlab/jfronny/inceptum/Inceptum/${dir%%-windows*}" - mkdir -p "$dir" - mv "$main" "$dir/${main##*/}" - curl -L "https://github.com/pal1000/mesa-dist-win/releases/download/21.2.5/mesa3d-21.2.5-release-msvc.7z" --output mesa.7z - 7z e mesa.7z -oportable/run/natives/forceload x64/dxil.dll x64/libglapi.dll x64/opengl32.dll - curl -L "https://api.adoptium.net/v3/binary/latest/18/ga/windows/x64/jre/hotspot/normal/eclipse?project=jdk" --output jvm.zip - 7z x jvm.zip -oportable/ - mv portable/jdk*/* portable/jvm/ - rm -r portable/jdk* - cp packaging/windows/launch.bat portable/ - cd portable - 7z a ../portable.7z * -mx9 artifacts: paths: - portable.7z expire_in: 2 days only: - master include: - remote: 'https://jfmods.gitlab.io/scripts/docs.yml'