File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,6 +56,32 @@ allprojects {
5656 }
5757}
5858
59+ subprojects {
60+ if (! this .name.contains(" sample" ) && this .name != " sentry-test-support" ) {
61+ apply<DistributionPlugin >()
62+
63+ configure<DistributionContainer > {
64+ this .getByName(" main" ).contents {
65+ // non android modules
66+ from(" build/libs" )
67+ from(" build/publications/maven" )
68+ // android modules
69+ from(" build/outputs/aar" )
70+ from(" build/publications/release" )
71+ }
72+ }
73+ tasks.named(" distZip" ).configure {
74+ this .dependsOn(" publishToMavenLocal" )
75+ this .doLast {
76+ val distributionFilePath = " ${this .project.buildDir} /distributions/${this .project.name} -${this .project.version} .zip"
77+ val file = File (distributionFilePath)
78+ if (! file.exists()) throw IllegalStateException (" Distribution file: $distributionFilePath does not exist" )
79+ if (file.length() == 0L ) throw IllegalStateException (" Distribution file: $distributionFilePath is empty" )
80+ }
81+ }
82+ }
83+ }
84+
5985spotless {
6086 lineEndings = LineEnding .UNIX
6187 java {
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Redirect stderr to stdout to avoid weird Powershell errors
3+ exec 2>&1
4+ set -x
5+
6+ export PATH=./node_modules/.bin:$PATH
7+
8+ upload_artifacts () {
9+ zeus upload -t " application/x-java-archive" ./* /build/distributions/* .zip
10+ zeus job update --status=passed
11+ }
12+
13+
14+ report_pending () {
15+ zeus job update --status=pending
16+ }
17+
18+
19+ report_failed () {
20+ zeus job update --status=failed
21+ }
22+
23+
24+ check_branch () {
25+ # Ignore errors if not on release branch
26+ if [[ ! " ${APPVEYOR_REPO_BRANCH:- } " =~ ^main/ ]]; then
27+ trap - EXIT
28+ echo " Not on a release branch, ignoring all errors, if any."
29+ exit 0
30+ fi
31+ }
32+
33+ trap check_branch EXIT
34+
35+ command=" ${1:- } "
36+ if [[ " $command " == " upload_artifacts" ]]; then
37+ upload_artifacts
38+ elif [[ " $command " == " report_pending" ]]; then
39+ report_pending
40+ elif [[ " $command " == " report_failed" ]]; then
41+ report_failed
42+ else
43+ echo " Invalid command"
44+ exit 1
45+ fi
You can’t perform that action at this time.
0 commit comments