ktaglib: autobuild taglib on gradle build
This commit is contained in:
+19
-8
@@ -1,3 +1,5 @@
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
@@ -41,12 +43,21 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
task assembleTaglib(type: Exec) {
|
||||
def jniDir = "$projectDir/src/main/cpp/"
|
||||
def libs = new File("$jniDir/taglib/pkg")
|
||||
if (libs.exists()) {
|
||||
commandLine "true"
|
||||
return
|
||||
}
|
||||
commandLine "sh", "-c", "$jniDir/build_taglib.sh $android.ndkDirectory"
|
||||
}
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.15.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
||||
}
|
||||
afterEvaluate {
|
||||
preDebugBuild.dependsOn assembleTaglib
|
||||
preReleaseBuild.dependsOn assembleTaglib
|
||||
}
|
||||
|
||||
clean {
|
||||
delete "$projectDir/src/main/jni/ffmpeg/android-libs/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user