move task package from build.gradle to build.py

This commit is contained in:
ansgarz 2023-11-15 18:06:42 +01:00
parent 59163710af
commit 42c92915f8
2 changed files with 13 additions and 8 deletions

View file

@ -69,13 +69,7 @@ package:
<<: *kotlin <<: *kotlin
stage: package stage: package
script: script:
- ./gradlew -x assemble -x test jar - pyb package
- ./gradlew -x assemble -x test -x jar uberjarDesktop
- ./gradlew -x assemble -x test -x jar uberjarServer
- ./gradlew -x assemble -x test -x jar uberjarSyspec
- cd build/libs/
- find . -type f -exec sha256sum {} \; | sort > sha256sum.lst
- find . -type f -exec sha512sum {} \; | sort > sha512sum.lst
artifacts: artifacts:
paths: paths:
- build/libs/*.jar - build/libs/*.jar

View file

@ -1,4 +1,3 @@
from os import environ
from subprocess import run from subprocess import run
from pybuilder.core import init, task from pybuilder.core import init, task
from ddadevops import * from ddadevops import *
@ -59,11 +58,23 @@ def tag(project):
build = get_devops_build(project) build = get_devops_build(project)
build.tag_bump_and_push_release() build.tag_bump_and_push_release()
@task @task
def build(project): def build(project):
print("---------- build stage ----------") print("---------- build stage ----------")
run("./gradlew assemble", shell=True) run("./gradlew assemble", shell=True)
@task
def package(project):
run("./gradlew -x test jar", shell=True)
run("./gradlew -x test uberjarDesktop", shell=True)
run("./gradlew -x test uberjarServer", shell=True)
run("./gradlew -x test uberjarSyspec", shell=True)
run("cd build/libs/ && find . -type f -exec sha256sum {} \; | sort > sha256sum.lst", shell=True)
run("cd build/libs/ && find . -type f -exec sha512sum {} \; | sort > sha512sum.lst", shell=True)
def release(project): def release(project):
prepare(project) prepare(project)
tag(project) tag(project)