Skip to content

Commit

Permalink
Fix NDK default path (#1229)
Browse files Browse the repository at this point in the history
  • Loading branch information
José Pereda authored Sep 1, 2023
1 parent a145962 commit 9b03bc9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import static com.gluonhq.substrate.target.AndroidTargetConfiguration.ANDROID_NDK_VERSION;

/**
* This class contains all configuration info about the current project (not about the current OS/Arch/vendor etc)
*
Expand Down Expand Up @@ -272,7 +274,7 @@ public Path getAndroidSdkPath() {
public Path getAndroidNdkPath() {
String ndkEnv = System.getenv("ANDROID_NDK");
return (ndkEnv != null) ? Paths.get(ndkEnv)
: getAndroidSdkPath().resolve("ndk-bundle");
: getAndroidSdkPath().resolve("ndk").resolve(ANDROID_NDK_VERSION);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2022, Gluon
* Copyright (c) 2019, 2023, Gluon
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -66,6 +66,7 @@ public class AndroidTargetConfiguration extends PosixTargetConfiguration {

private static final String ANDROID_TRIPLET = new Triplet(Constants.Profile.ANDROID).toString();
private static final String ANDROID_MIN_SDK_VERSION = "21";
public static final String ANDROID_NDK_VERSION = "25.2.9519653";
private static final List<String> ANDROID_KEYSTORE_EXTENSIONS = List.of(".keystore", ".jks");
private static final String WL_WHOLE_ARCHIVE = "-Wl,--whole-archive";
private static final String WL_NO_WHOLE_ARCHIVE = "-Wl,--no-whole-archive";
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/gluonhq/substrate/util/FileDeps.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static com.gluonhq.substrate.target.AndroidTargetConfiguration.ANDROID_NDK_VERSION;

public final class FileDeps {

private static final String JAVA_STATIC_ZIP = "${staticjdk}-${target}-gvm-${version}.zip";
Expand All @@ -71,7 +73,7 @@ public final class FileDeps {
private static final String ANDROID_KEY = "24333f8a63b6825ea9c5514f83c2829b004d1fee";
private static final String[] ANDROID_SDK_PACKAGES = {
"platforms;android-33", "build-tools;33.0.2", "platform-tools",
"extras;android;m2repository", "extras;google;m2repository", "ndk;25.2.9519653"
"extras;android;m2repository", "extras;google;m2repository", "ndk;" + ANDROID_NDK_VERSION
};

private static final String ARCH_SYSROOT_URL = "https://download2.gluonhq.com/substrate/sysroot/${arch}sysroot-${version}.zip";
Expand Down

0 comments on commit 9b03bc9

Please sign in to comment.