Created
February 14, 2014 17:17
-
-
Save Tom-Ski/9005072 to your computer and use it in GitHub Desktop.
Hoop Jumping
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// called every time gradle gets executed, takes the native dependencies of | |
// the natives configuration, and extracts them to the proper libs/ folders | |
// so they get packed with the APK. | |
task copyAndroidNatives() { | |
file("libs/armeabi/").mkdirs(); | |
file("libs/armeabi-v7a/").mkdirs(); | |
configurations.natives.files.each { jar -> | |
def outputDir = null | |
if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a") | |
if (jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi") | |
if(outputDir != null) { | |
copy { | |
from zipTree(jar) | |
into outputDir | |
include "*.so" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment