v2.2.0: fixed copyAndroidNatives causing errors with project cleaning
This commit is contained in:
@@ -76,6 +76,7 @@ dependencies {
|
|||||||
// the natives configuration, and extracts them to the proper libs/ folders
|
// the natives configuration, and extracts them to the proper libs/ folders
|
||||||
// so they get packed with the APK.
|
// so they get packed with the APK.
|
||||||
task copyAndroidNatives() {
|
task copyAndroidNatives() {
|
||||||
|
doFirst {
|
||||||
file("libs/armeabi-v7a/").mkdirs()
|
file("libs/armeabi-v7a/").mkdirs()
|
||||||
file("libs/arm64-v8a/").mkdirs()
|
file("libs/arm64-v8a/").mkdirs()
|
||||||
file("libs/x86/").mkdirs()
|
file("libs/x86/").mkdirs()
|
||||||
@@ -83,11 +84,11 @@ task copyAndroidNatives() {
|
|||||||
|
|
||||||
configurations.natives.copy().files.each { jar ->
|
configurations.natives.copy().files.each { jar ->
|
||||||
def outputDir = null
|
def outputDir = null
|
||||||
if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
|
if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
|
||||||
if(jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
|
if (jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
|
||||||
if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
|
if (jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
|
||||||
if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
|
if (jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
|
||||||
if(outputDir != null) {
|
if (outputDir != null) {
|
||||||
copy {
|
copy {
|
||||||
from zipTree(jar)
|
from zipTree(jar)
|
||||||
into outputDir
|
into outputDir
|
||||||
@@ -95,4 +96,5 @@ task copyAndroidNatives() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user