| import com.android.ndkports.AutoconfPortTask |
| import com.android.ndkports.CMakeCompatibleVersion |
| import com.android.ndkports.PrefabSysrootPlugin |
| |
| val portVersion = "7.85.0" |
| |
| group = "com.android.ndk.thirdparty" |
| version = "$portVersion${rootProject.extra.get("snapshotSuffix")}" |
| |
| plugins { |
| id("maven-publish") |
| id("com.android.ndkports.NdkPorts") |
| distribution |
| } |
| |
| dependencies { |
| implementation(project(":openssl")) |
| } |
| |
| ndkPorts { |
| ndkPath.set(File(project.findProperty("ndkPath") as String)) |
| source.set(project.file("src.tar.gz")) |
| minSdkVersion.set(21) |
| } |
| |
| tasks.prefab { |
| generator.set(PrefabSysrootPlugin::class.java) |
| } |
| |
| tasks.register<AutoconfPortTask>("buildPort") { |
| autoconf { |
| args( |
| "--disable-ntlm-wb", |
| "--enable-ipv6", |
| "--with-zlib", |
| "--with-ca-path=/system/etc/security/cacerts", |
| "--with-ssl=$sysroot" |
| ) |
| } |
| } |
| |
| tasks.prefabPackage { |
| version.set(CMakeCompatibleVersion.parse(portVersion)) |
| |
| licensePath.set("COPYING") |
| |
| @Suppress("UnstableApiUsage") dependencies.set( |
| mapOf( |
| "openssl" to "1.1.1k" |
| ) |
| ) |
| |
| modules { |
| create("curl") { |
| dependencies.set( |
| listOf( |
| "//openssl:crypto", "//openssl:ssl" |
| ) |
| ) |
| } |
| } |
| } |
| |
| publishing { |
| publications { |
| create<MavenPublication>("maven") { |
| from(components["prefab"]) |
| pom { |
| name.set("curl") |
| description.set("The ndkports AAR for curl.") |
| url.set( |
| "https://android.googlesource.com/platform/tools/ndkports" |
| ) |
| licenses { |
| license { |
| name.set("The curl License") |
| url.set("https://curl.haxx.se/docs/copyright.html") |
| distribution.set("repo") |
| } |
| } |
| developers { |
| developer { |
| name.set("The Android Open Source Project") |
| } |
| } |
| scm { |
| url.set("https://android.googlesource.com/platform/tools/ndkports") |
| connection.set("scm:git:https://android.googlesource.com/platform/tools/ndkports") |
| } |
| } |
| } |
| } |
| |
| repositories { |
| maven { |
| url = uri("${project.buildDir}/repository") |
| } |
| } |
| } |
| |
| distributions { |
| main { |
| contents { |
| from("${project.buildDir}/repository") |
| include("**/*.aar") |
| include("**/*.pom") |
| } |
| } |
| } |
| |
| tasks { |
| distZip { |
| dependsOn("publish") |
| destinationDirectory.set(File(rootProject.buildDir, "distributions")) |
| } |
| } |