Skip to content

Commit

Permalink
Initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
BastiaanOlij committed Sep 19, 2022
0 parents commit 37217de
Show file tree
Hide file tree
Showing 18 changed files with 517 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.bat eol=crlf
*.gitattributes eol=lf
*.gitignore eol=lf
*.gdap eol=lf
*.gradle eol=lf
*.java eol=lf
*.pro eol=lf
*.properties eol=lf
*.xml eol=lf

gradlew eol=lf
57 changes: 57 additions & 0 deletions .github/workflows/build-on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Workflow to automatically create deliverables
name: Build on push

on:
[push, pull_request]

jobs:
build:
name: Assembling artifacts
runs-on: ubuntu-20.04

# Note, to satisfy the asset library we need to make sure our zip files have a root folder
# this is why we checkout into aar
# and build asset
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: aar
- name: Setup java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Create Godot OpenXR Meta AAR
- run: |
cd aar
./gradlew build
cd ..
- name: Create Godot OpenXR Meta Asset
run: |
mkdir asset
mkdir asset/android
mkdir asset/android/plugins
cp aar/GodotOpenXRMeta.gdap asset/android/plugins/
cp aar/godotopenxrmeta/build/outputs/*.aar asset/android/plugins/
- name: Create Godot OpenXR Meta asset artifact
uses: actions/upload-artifact@v2
with:
name: GodotOpenXRMeta
path: |
asset
- name: Zip asset
run: |
zip -qq -r godotopenxrmeta.zip asset
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
- name: Create and upload asset
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "godotopenxrmeta.zip"
omitNameDuringUpdate: true
omitBodyDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
7 changes: 7 additions & 0 deletions GodotOpenXRMeta.gdap
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[config]

name="GodotOpenXRMeta"
binary_type="local"
binary="godotopenxrmeta-debug.aar"

[dependencies]
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.3"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
1 change: 1 addition & 0 deletions godotopenxrmeta/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
46 changes: 46 additions & 0 deletions godotopenxrmeta/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
plugins {
id 'com.android.library'
}

android {
compileSdk 31

defaultConfig {
minSdk 19
targetSdk 31
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "arm64-v8a"
}
}

buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
packagingOptions {
doNotStrip '**/*.so'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}

dependencies {
implementation "androidx.legacy:legacy-support-v4:1.0.0"

compileOnly files('src/godot/godot-lib.release.aar')
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
21 changes: 21 additions & 0 deletions godotopenxrmeta/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Binary file added godotopenxrmeta/src/godot/godot-lib.release.aar
Binary file not shown.
11 changes: 11 additions & 0 deletions godotopenxrmeta/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.godot.godotopenxrmeta">

<application>
<meta-data
android:name="org.godotengine.plugin.v1.GodotOpenXRMeta"
android:value="com.godot.godotopenxrmeta.GodotOpenXRMeta" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.godot.godotopenxrmeta;

import org.godotengine.godot.Godot;
import java.util.Set;


public class GodotOpenXRMeta extends org.godotengine.godot.plugin.GodotPlugin{

public GodotOpenXRMeta(Godot godot) {
super(godot);
}

@Override
public String getPluginName() {
return "GodotOpenXRMeta";
}

@Override
protected Set<String> getPluginGDNativeLibrariesPaths() {
return super.getPluginGDNativeLibrariesPaths();
}
}
Binary file not shown.
19 changes: 19 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Fri Mar 11 11:10:12 NZDT 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Loading

0 comments on commit 37217de

Please sign in to comment.