-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logic to publish the Godot OpenXR Android library to MavenCentral
- Loading branch information
Showing
10 changed files
with
203 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
ext.versions = [ | ||
gradlePluginVersion: '7.0.3', | ||
compileSdk : 30, | ||
minSdk : 19, // Also update 'android/src/main/AndroidManifest.xml#minSdkVersion' value | ||
targetSdk : 30, // Also update 'android/src/main/AndroidManifest.xml#targetSdkVersion' value | ||
buildTools : '30.0.3', | ||
kotlinVersion : '1.6.10', | ||
ndkVersion : "21.4.7075529", | ||
javaVersion : JavaVersion.VERSION_1_8 | ||
] | ||
ext { | ||
versions = [ | ||
gradlePluginVersion: '7.0.3', | ||
compileSdk : 30, | ||
minSdk : 19, // Also update 'android/src/main/AndroidManifest.xml#minSdkVersion' value | ||
targetSdk : 30, // Also update 'android/src/main/AndroidManifest.xml#targetSdkVersion' value | ||
buildTools : '30.0.3', | ||
kotlinVersion : '1.6.10', | ||
ndkVersion : "21.4.7075529", | ||
javaVersion : JavaVersion.VERSION_1_8, | ||
versionCode : 10300, // Also update 'src/main/AndroidManifest.xml#versionCode' value | ||
versionName : '1.3.0.beta', // Also update 'src/main/AndroidManifest.xml#versionName' value | ||
godotVersion : '3.5.0.beta', | ||
] | ||
|
||
PUBLISH_ARTIFACT_ID = 'godot-openxr' | ||
STUB_PUBLISH_ARTIFACT_ID = PUBLISH_ARTIFACT_ID + "-stub" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
group = ossrhGroupId | ||
version = versions.versionName | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
fullRelease(MavenPublication) { | ||
from components.fullRelease | ||
|
||
// The coordinates of the library, being set from variables that | ||
// we'll set up later | ||
groupId ossrhGroupId | ||
artifactId PUBLISH_ARTIFACT_ID | ||
version versions.versionName | ||
|
||
// Mostly self-explanatory metadata | ||
pom { | ||
name = PUBLISH_ARTIFACT_ID | ||
description = 'Godot OpenXR Android Library' | ||
url = 'https://docs.godotengine.org/en/stable/tutorials/vr/openxr/index.html' | ||
licenses { | ||
license { | ||
name = 'MIT License' | ||
url = 'https://github.com/GodotVR/godot_openxr/blob/master/LICENSE' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'm4gr3d' | ||
name = 'Fredia Huya-Kouadio' | ||
email = 'fhuyakou@gmail.com' | ||
} | ||
developer { | ||
id = 'BastiaanOlij' | ||
name = 'Bastiaan Olij' | ||
email = 'mux213@gmail.com' | ||
} | ||
developer { | ||
id = 'ChristophHaag' | ||
name = 'Christoph Haag' | ||
email = 'haagch@frickel.club' | ||
} | ||
// Add all other devs here... | ||
} | ||
|
||
// Version control info - if you're using GitHub, follow the | ||
// format as seen here | ||
scm { | ||
connection = 'scm:git:github.com/GodotVR/godot_openxr.git' | ||
developerConnection = 'scm:git:ssh://github.com/GodotVR/godot_openxr.git' | ||
url = 'https://github.com/GodotVR/godot_openxr/tree/master' | ||
} | ||
} | ||
} | ||
|
||
stubRelease(MavenPublication) { | ||
from components.stubRelease | ||
|
||
// The coordinates of the library, being set from variables that | ||
// we'll set up later | ||
groupId ossrhGroupId | ||
artifactId STUB_PUBLISH_ARTIFACT_ID | ||
version versions.versionName | ||
|
||
// Mostly self-explanatory metadata | ||
pom { | ||
name = STUB_PUBLISH_ARTIFACT_ID | ||
description = 'Godot OpenXR Android (Stub) Library' | ||
url = 'https://docs.godotengine.org/en/stable/tutorials/vr/openxr/index.html' | ||
licenses { | ||
license { | ||
name = 'MIT License' | ||
url = 'https://github.com/GodotVR/godot_openxr/blob/master/LICENSE' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'm4gr3d' | ||
name = 'Fredia Huya-Kouadio' | ||
email = 'fhuyakou@gmail.com' | ||
} | ||
developer { | ||
id = 'BastiaanOlij' | ||
name = 'Bastiaan Olij' | ||
email = 'mux213@gmail.com' | ||
} | ||
developer { | ||
id = 'ChristophHaag' | ||
name = 'Christoph Haag' | ||
email = 'haagch@frickel.club' | ||
} | ||
// Add all other devs here... | ||
} | ||
|
||
// Version control info - if you're using GitHub, follow the | ||
// format as seen here | ||
scm { | ||
connection = 'scm:git:github.com/GodotVR/godot_openxr.git' | ||
developerConnection = 'scm:git:ssh://github.com/GodotVR/godot_openxr.git' | ||
url = 'https://github.com/GodotVR/godot_openxr/tree/master' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
rootProject.ext["signing.keyId"], | ||
rootProject.ext["signing.key"], | ||
rootProject.ext["signing.password"], | ||
) | ||
sign publishing.publications | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Create variables with empty default values | ||
ext["signing.keyId"] = '' | ||
ext["signing.password"] = '' | ||
ext["signing.key"] = '' | ||
ext["ossrhGroupId"] = '' | ||
ext["ossrhUsername"] = '' | ||
ext["ossrhPassword"] = '' | ||
ext["sonatypeStagingProfileId"] = '' | ||
|
||
File secretPropsFile = project.rootProject.file('local.properties') | ||
if (secretPropsFile.exists()) { | ||
// Read local.properties file first if it exists | ||
Properties p = new Properties() | ||
new FileInputStream(secretPropsFile).withCloseable { is -> p.load(is) } | ||
p.each { name, value -> ext[name] = value } | ||
} else { | ||
// Use system environment variables | ||
ext["ossrhGroupId"] = System.getenv('OSSRH_GROUP_ID') | ||
ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') | ||
ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') | ||
ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID') | ||
ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') | ||
ext["signing.password"] = System.getenv('SIGNING_PASSWORD') | ||
ext["signing.key"] = System.getenv('SIGNING_KEY') | ||
} | ||
|
||
// Set up Sonatype repository | ||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
stagingProfileId = sonatypeStagingProfileId | ||
username = ossrhUsername | ||
password = ossrhPassword | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
} | ||
} | ||
} | ||
|