Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the Vulkan Validation Layers from Maven. #1072

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ curl = "7.79.1-beta-1"
googletest = "1.11.0-beta-1"
jsoncpp = "1.9.5-beta-1"
openssl = "1.1.1q-beta-1"
vulkanValidationLayers = "1.3.283.0"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
Expand All @@ -40,6 +41,7 @@ openssl = { group = "com.android.ndk.thirdparty", name = "openssl", version.ref

# build-logic dependencies
android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "agp" }
vulkan-validationLayers = { module = "com.github.danalbert.vvl:vulkan-validation-layers", version.ref = "vulkanValidationLayers" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
Expand Down
12 changes: 0 additions & 12 deletions hello-vulkan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@ features such as:

![Vulkan Triangle example](documentation-assets/example-triangle.png)

## Validation layers

As the validation layer is a sizeable download, we chose to not ship them within
the apk. As such in order to enable validation layer, please follow the simple
steps below:

1. Download the latest android binaries from:
https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases
1. Place them in their respective ABI folders located in: app/src/main/jniLibs
1. Go to hellovk.h, search for 'bool enableValidationLayers = false' and toggle
that to true.

## Extra information:

As Vulkan is well documented we will not provide detailed instructions regarding
Expand Down
3 changes: 2 additions & 1 deletion hello-vulkan/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {

android {
namespace 'com.android.hellovk'

defaultConfig {
applicationId 'com.android.hellovk'
// TODO: Figure out why this isn't 24.
Expand Down Expand Up @@ -52,4 +52,5 @@ android {
dependencies {
implementation libs.appcompat
implementation libs.androidx.games.gameactivity
debugImplementation(libs.vulkan.validationLayers)
}
10 changes: 10 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ pluginManagement {
gradlePluginPortal()
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/DanAlbert/Vulkan-ValidationLayers")
// This is apparently required even for public packages. Should probably push these to
// Maven Central instead...
credentials {
username = settings.ext.find("gpr.user") ?: System.getenv("USERNAME")
password = settings.ext.find("gpr.key") ?: System.getenv("TOKEN")
}
}
}
}

Expand Down
Loading