Repo created

This commit is contained in:
Fr4nz D13trich 2025-11-20 14:05:12 +01:00
parent 6e9a0d01ce
commit 7ee9806fba
2415 changed files with 312708 additions and 2 deletions

66
tcpdump/build.gradle Normal file
View file

@ -0,0 +1,66 @@
import com.android.build.gradle.internal.tasks.LibraryJniLibsTask
apply plugin: 'com.android.library'
android {
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
compileSdk 33
ndkVersion '25.2.9519653'
namespace 'org.adaway.libpcap'
defaultConfig {
minSdkVersion 26
targetSdkVersion 33
}
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
}
sonarqube {
skipProject = true
}
}
/**
* Task to rename executables from hello_world to libhello_world_exec.so
* If they look like libraries, they are packaged in the apk and deployed on the device in the lib folder!
*
* Help with files: https://docs.gradle.org/current/userguide/working_with_files.html
*/
def renameJniLibAsExecutable = tasks.register('renameJniLibAsExecutable', Copy) {
def flavor = gradle.startParameter.taskRequests.toString().containsIgnoreCase("debug") ? "debug" : "release"
def buildFolder = file("${buildDir}/intermediates/ndkBuild/${flavor}/obj/local/")
dependsOn ":${project.name}:externalNativeBuild${flavor.substring(0, 1).toUpperCase()}${flavor.substring(1)}"
from(buildFolder) {
exclude "**/objs"
exclude "**/objs-debug"
exclude "**/*.a"
exclude "**/*.d"
exclude "**/*.o"
exclude "**/*.so"
exclude "**/*.txt"
}
into buildFolder
rename '(.+)', 'lib$1_exec.so'
eachFile {
println "Replacing ${it.getPath()} from ${flavor} ndkBuild directory"
}
}
tasks.withType(LibraryJniLibsTask).configureEach {
dependsOn renameJniLibAsExecutable
}