Skip to content

Commit 886e52d

Browse files
Export JITPACK_NDK_VERSION for jitpack
Jitpack build is failing with the following error ``` > Configure project : Gradle version Gradle 7.1 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > com.android.builder.errors.EvalIssueException: NDK from ndk.dir at /opt/android-sdk-linux/ndk-bundle had version [21.1.6352462] which disagrees with android.ndkVersion [22.1.7171670] ``` So attempting to manually export an env variable for jitpack which uses ndk 21.1.6352462 instead of the termux default 22.1.7171670 and which is also used by F-Droid https://jitpack.io/com/github/termux/termux-app/0.115/build.log https://github.com/jitpack/jitpack.io/blob/master/BUILDING.md#custom-commands https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.termux.yml#L726
1 parent 8e4da6c commit 886e52d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44

55
android {
66
compileSdkVersion project.properties.compileSdkVersion.toInteger()
7-
ndkVersion project.properties.ndkVersion
7+
ndkVersion = System.getenv("JITPACK_NDK_VERSION") ?: project.properties.ndkVersion
88

99
dependencies {
1010
implementation "androidx.annotation:annotation:1.2.0"

jitpack.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
env:
2+
JITPACK_NDK_VERSION: "21.1.6352462"

terminal-emulator/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'maven-publish'
33

44
android {
55
compileSdkVersion project.properties.compileSdkVersion.toInteger()
6-
ndkVersion project.properties.ndkVersion
6+
ndkVersion = System.getenv("JITPACK_NDK_VERSION") ?: project.properties.ndkVersion
77

88
defaultConfig {
99
minSdkVersion project.properties.minSdkVersion.toInteger()

0 commit comments

Comments
 (0)