Skip to content

Commit 7450c54

Browse files
authored
Merge pull request #294 from rpavlik/auto-release-aar
Auto release aar
2 parents 08ae73e + d81a32e commit 7450c54

File tree

5 files changed

+15
-21
lines changed

5 files changed

+15
-21
lines changed

maintainer-scripts/build-and-publish-aar-mavencentral.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Copyright (c) 2020-2021 Collabora, Ltd.
2+
# Copyright (c) 2020-2022 Collabora, Ltd.
33
#
44
# SPDX-License-Identifier: Apache-2.0
55
set -e
@@ -15,3 +15,6 @@ rm -f "${ROOT}/SNAPSHOT"
1515
# Publish AAR using Gradle
1616
cd "${MAINT_SCRIPTS}/publish-aar"
1717
./gradlew publishMavenPublicationToBuildDirRepository publishMavenPublicationToOSSRHRepository
18+
19+
# Need to explicitly "close and release" it then
20+
./gradlew closeAndReleaseRepository

maintainer-scripts/publish-aar/build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
// Copyright 2021, Collabora, Ltd.
1+
// Copyright 2021-2022, Collabora, Ltd.
22
// SPDX-License-Identifier: BSL-1.0
33
plugins {
44
id("maven-publish")
55
signing
6+
id("io.codearte.nexus-staging").version("0.30.0")
67
}
78

89
// These next few lines are just to make the version match the OpenXR release.
@@ -94,3 +95,8 @@ publishing {
9495
}
9596
}
9697
}
98+
nexusStaging {
99+
serverUrl = "https://s01.oss.sonatype.org/service/local/"
100+
username = System.getenv("OSSRH_USER") ?: return@nexusStaging
101+
password = System.getenv("OSSRH_PASSWORD") ?: return@nexusStaging
102+
}
293 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

maintainer-scripts/publish-aar/gradlew.bat

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4242

4343
set JAVA_EXE=java.exe
4444
%JAVA_EXE% -version >NUL 2>&1
45-
if "%ERRORLEVEL%" == "0" goto init
45+
if "%ERRORLEVEL%" == "0" goto execute
4646

4747
echo.
4848
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -56,7 +56,7 @@ goto fail
5656
set JAVA_HOME=%JAVA_HOME:"=%
5757
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5858

59-
if exist "%JAVA_EXE%" goto init
59+
if exist "%JAVA_EXE%" goto execute
6060

6161
echo.
6262
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -66,29 +66,14 @@ echo location of your Java installation.
6666

6767
goto fail
6868

69-
:init
70-
@rem Get command-line arguments, handling Windows variants
71-
72-
if not "%OS%" == "Windows_NT" goto win9xME_args
73-
74-
:win9xME_args
75-
@rem Slurp the command line arguments.
76-
set CMD_LINE_ARGS=
77-
set _SKIP=2
78-
79-
:win9xME_args_slurp
80-
if "x%~1" == "x" goto execute
81-
82-
set CMD_LINE_ARGS=%*
83-
8469
:execute
8570
@rem Setup the command line
8671

8772
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
8873

8974

9075
@rem Execute Gradle
91-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
9277

9378
:end
9479
@rem End local scope for the variables with windows NT shell

0 commit comments

Comments
 (0)