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

Fix NDK default path #1229

Merged
merged 2 commits into from
Sep 1, 2023
Merged
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
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
Loading