1 import com.android.ndkports.AutoconfPortTask 2 import com.android.ndkports.CMakeCompatibleVersion 3 import com.android.ndkports.PrefabSysrootPlugin 4 5 val portVersion = "7.85.0" 6 7 group = "com.android.ndk.thirdparty" 8 version = "$portVersion${rootProject.extra.get("snapshotSuffix")}" 9 <lambda>null10plugins { 11 id("maven-publish") 12 id("com.android.ndkports.NdkPorts") 13 distribution 14 } 15 <lambda>null16dependencies { 17 implementation(project(":openssl")) 18 } 19 <lambda>null20ndkPorts { 21 ndkPath.set(File(project.findProperty("ndkPath") as String)) 22 source.set(project.file("src.tar.gz")) 23 minSdkVersion.set(21) 24 } 25 <lambda>null26tasks.prefab { 27 generator.set(PrefabSysrootPlugin::class.java) 28 } 29 <lambda>null30tasks.register<AutoconfPortTask>("buildPort") { 31 autoconf { 32 args( 33 "--disable-ntlm-wb", 34 "--enable-ipv6", 35 "--with-zlib", 36 "--with-ca-path=/system/etc/security/cacerts", 37 "--with-ssl=$sysroot" 38 ) 39 } 40 } 41 <lambda>null42tasks.prefabPackage { 43 version.set(CMakeCompatibleVersion.parse(portVersion)) 44 45 licensePath.set("COPYING") 46 47 @Suppress("UnstableApiUsage") dependencies.set( 48 mapOf( 49 "openssl" to "1.1.1k" 50 ) 51 ) 52 53 modules { 54 create("curl") { 55 dependencies.set( 56 listOf( 57 "//openssl:crypto", "//openssl:ssl" 58 ) 59 ) 60 } 61 } 62 } 63 <lambda>null64publishing { 65 publications { 66 create<MavenPublication>("maven") { 67 from(components["prefab"]) 68 pom { 69 name.set("curl") 70 description.set("The ndkports AAR for curl.") 71 url.set( 72 "https://android.googlesource.com/platform/tools/ndkports" 73 ) 74 licenses { 75 license { 76 name.set("The curl License") 77 url.set("https://curl.haxx.se/docs/copyright.html") 78 distribution.set("repo") 79 } 80 } 81 developers { 82 developer { 83 name.set("The Android Open Source Project") 84 } 85 } 86 scm { 87 url.set("https://android.googlesource.com/platform/tools/ndkports") 88 connection.set("scm:git:https://android.googlesource.com/platform/tools/ndkports") 89 } 90 } 91 } 92 } 93 94 repositories { 95 maven { 96 url = uri("${project.buildDir}/repository") 97 } 98 } 99 } 100 <lambda>null101distributions { 102 main { 103 contents { 104 from("${project.buildDir}/repository") 105 include("**/*.aar") 106 include("**/*.pom") 107 } 108 } 109 } 110 <lambda>null111tasks { 112 distZip { 113 dependsOn("publish") 114 destinationDirectory.set(File(rootProject.buildDir, "distributions")) 115 } 116 } 117