Skip to content

Commit

Permalink
Export JITPACK_NDK_VERSION for jitpack
Browse files Browse the repository at this point in the history
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
  • Loading branch information
agnostic-apollo committed Jul 1, 2021
1 parent 8e4da6c commit 886e52d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {

android {
compileSdkVersion project.properties.compileSdkVersion.toInteger()
ndkVersion project.properties.ndkVersion
ndkVersion = System.getenv("JITPACK_NDK_VERSION") ?: project.properties.ndkVersion

dependencies {
implementation "androidx.annotation:annotation:1.2.0"
Expand Down
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
env:
JITPACK_NDK_VERSION: "21.1.6352462"
2 changes: 1 addition & 1 deletion terminal-emulator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'maven-publish'

android {
compileSdkVersion project.properties.compileSdkVersion.toInteger()
ndkVersion project.properties.ndkVersion
ndkVersion = System.getenv("JITPACK_NDK_VERSION") ?: project.properties.ndkVersion

defaultConfig {
minSdkVersion project.properties.minSdkVersion.toInteger()
Expand Down

0 comments on commit 886e52d

Please sign in to comment.