Skip to content

Commit

Permalink
Fix compile error when use "android_add_jni_dir"
Browse files Browse the repository at this point in the history
  • Loading branch information
volzhs committed May 12, 2017
1 parent 5a6ccce commit be7ced4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions platform/android/build.gradle.template
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ android {
$$GRADLE_ASSET_DIRS$$
]
jniLibs.srcDirs = [
'libs'
$$GRADLE_JNI_DIRS$$
]
}
Expand Down

5 comments on commit be7ced4

@RandomShaper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing a regression, by which the native libs get into a wrong intermediate folder during build. Because of that, the APKs are not regenerated when the .so files change, leaving you with an outdated build.

What's the exact issue you were fixing?

@RandomShaper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My proposal is dropping that jniLibs.srcDirs block altogether and force people to provide debug and release variants of their third-party libraries in the same fashion and locations as libgodot_android.so.

@volzhs
Copy link
Contributor Author

@volzhs volzhs commented on be7ced4 May 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RandomShaper I didn't notice that.
$$GRADLE_JNI_DIRS$$ has string like ,'path/lib1', 'path/lib2'
so it causes error while build.
would you make a PR with you proposal?

@volzhs
Copy link
Contributor Author

@volzhs volzhs commented on be7ced4 May 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RandomShaper what about removing L68-L71?
will it be problem?
I compiled android template without these lines and seems fine. (updated .so)
what do you think?

@RandomShaper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should work.

And what I was telling about forcing to provide debug and release variants, forget it. Maybe in a future it may be useful to allow that, but currently it's not supported (and not requested, AFAIK).

Please sign in to comment.