Skip to content

Commit

Permalink
Merge pull request #13 from longjunyu2/try-fix-gradle-file
Browse files Browse the repository at this point in the history
gradle: fixed gradle file
  • Loading branch information
longjunyu2 authored Aug 9, 2024
2 parents 1fdb223 + 89294a6 commit d17556e
Show file tree
Hide file tree
Showing 25 changed files with 483 additions and 31 deletions.
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "app/src/main/cpp/OpenXR-SDK"]
path = app/src/main/cpp/OpenXR-SDK
url = https://github.com/KhronosGroup/OpenXR-SDK.git
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.cxx
/build
/release
3 changes: 0 additions & 3 deletions app/.gitmodules

This file was deleted.

52 changes: 33 additions & 19 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,46 +1,60 @@
apply plugin: 'com.android.application'
plugins {
alias(libs.plugins.android.application)
}

android {
compileSdk 30
namespace 'com.winlator'
compileSdk 34

defaultConfig {
applicationId 'com.winlator'
minSdkVersion 26
targetSdkVersion 28
applicationId "com.winlator"
minSdk 26
targetSdk 28
versionCode 17
versionName "7.1.1-glibc"
externalNativeBuild {
cmake {
cppFlags ''
}
}

ndk {
abiFilters 'arm64-v8a'
}
}

buildTypes {
debug {
minifyEnabled true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

ndk {
abiFilters 'arm64-v8a'
}
}
}

lintOptions {
checkReleaseBuilds false
}

ndkVersion '22.1.7171670'
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
version '3.22.1'
path 'src/main/cpp/CMakeLists.txt'
}
}
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.github.luben:zstd-jni:1.5.2-3@aar'
implementation 'org.tukaani:xz:1.7'
implementation 'org.apache.commons:commons-compress:1.20'
}
implementation libs.appcompat
implementation libs.material
implementation libs.preference
implementation libs.xz
implementation libs.commons.compress
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
implementation(libs.zstd.jni) { artifact { type = 'aar' } }
}
16 changes: 9 additions & 7 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\tools\adt-bundle-windows-x86_64-20131030\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
# 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

# Add any project specific keep options here:

# 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 *;
#}

-dontobfuscate
# 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
2 changes: 1 addition & 1 deletion app/src/main/cpp/OpenXR-SDK
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private void duplicateContainer(Container srcContainer) {

Container dstContainer = new Container(id);
dstContainer.setRootDir(dstDir);
dstContainer.setName(srcContainer.getName()+" ("+context.getString(R.string.copy)+")");
dstContainer.setName(srcContainer.getName()+" ("+context.getString(R.string._copy)+")");
dstContainer.setScreenSize(srcContainer.getScreenSize());
dstContainer.setEnvVars(srcContainer.getEnvVars());
dstContainer.setCPUList(srcContainer.getCPUList());
Expand Down
Binary file not shown.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
}
22 changes: 22 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-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
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonFinalResIds=false
26 changes: 26 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[versions]
agp = "8.4.2"
commonsCompress = "1.21"
junit = "4.13.2"
junitVersion = "1.2.1"
espressoCore = "3.6.1"
appcompat = "1.7.0"
material = "1.12.0"
preference = "1.2.1"
xz = "1.7"
zstdJni = "1.5.2-3"

[libraries]
commons-compress = { module = "org.apache.commons:commons-compress", version.ref = "commonsCompress" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
preference = { module = "androidx.preference:preference", version.ref = "preference" }
xz = { module = "org.tukaani:xz", version.ref = "xz" }
zstd-jni = { module = "com.github.luben:zstd-jni", version.ref = "zstdJni" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }

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 Jun 07 19:24:10 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit d17556e

Please sign in to comment.