@@ -32,55 +32,55 @@ tasks.jar.configure {
3232 }
3333}
3434
35- val androidAar by tasks.registering(Zip ::class ) {
36- group = " build"
37- archiveBaseName.set(project.name+ " -android" )
38- archiveExtension.set(" aar" )
39- destinationDirectory.set(layout.buildDirectory.dir(" outputs/aar" ))
40- val manifestFile = layout.buildDirectory.file(" tmp/androidAar/AndroidManifest.xml" )
41- doFirst {
42- val mf = manifestFile.get().asFile
43- mf.parentFile.mkdirs()
44- mf.writeText(
45- """
46- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
47- package="${project.group} .libdatachannel.archdetect">
48- </manifest>
49- """ .trimIndent()
50- )
51- }
52- from(manifestFile) {
53- into(" " )
54- }
55- dependsOn(nativeLibs, tasks.jar)
56- }
35+ // val androidAar by tasks.registering(Zip::class) {
36+ // group = "build"
37+ // archiveBaseName.set(project.name+"-android")
38+ // archiveExtension.set("aar")
39+ // destinationDirectory.set(layout.buildDirectory.dir("outputs/aar"))
40+ // val manifestFile = layout.buildDirectory.file("tmp/androidAar/AndroidManifest.xml")
41+ // doFirst {
42+ // val mf = manifestFile.get().asFile
43+ // mf.parentFile.mkdirs()
44+ // mf.writeText(
45+ // """
46+ // <manifest xmlns:android="http://schemas.android.com/apk/res/android"
47+ // package="${project.group}.libdatachannel.archdetect">
48+ // </manifest>
49+ // """.trimIndent()
50+ // )
51+ // }
52+ // from(manifestFile) {
53+ // into("")
54+ // }
55+ // dependsOn(nativeLibs, tasks.jar)
56+ // }
5757
58- androidAar.configure {
59- nativeLibs.get().resolvedConfiguration.resolvedArtifacts.forEach { artifact ->
60- val classifier = artifact.classifier ? : return @forEach
61- if (classifier.startsWith(" android-" )) {
62- var abi = classifier.removePrefix(" android-" )
63- from(zipTree(artifact.file)) {
64- include(" native/*.so" )
65- includeEmptyDirs = false
66- eachFile {
67- val p = path
68- val newPath = RelativePath (true , " jni" , abi, p.removePrefix(" native/" ))
69- relativePath = newPath
70- }
71- }
72- }
73- }
74- }
58+ // androidAar.configure {
59+ // nativeLibs.get().resolvedConfiguration.resolvedArtifacts.forEach { artifact ->
60+ // val classifier = artifact.classifier ?: return@forEach
61+ // if (classifier.startsWith("android-")) {
62+ // var abi = classifier.removePrefix("android-")
63+ // from(zipTree(artifact.file)) {
64+ // include("native/*.so")
65+ // includeEmptyDirs = false
66+ // eachFile {
67+ // val p = path
68+ // val newPath = RelativePath(true, "jni", abi, p.removePrefix("native/"))
69+ // relativePath = newPath
70+ // }
71+ // }
72+ // }
73+ // }
74+ // }
7575
76- tasks.jar {
77- finalizedBy(androidAar)
78- }
76+ // tasks.jar {
77+ // finalizedBy(androidAar)
78+ // }
7979
8080publishing.publications.withType<MavenPublication >().configureEach {
81- artifact(androidAar) {
82- classifier = " android"
83- }
81+ // artifact(androidAar) {
82+ // classifier = "android"
83+ // }
8484 pom {
8585 description = " ${rootProject.description} The ${project.name} module bundles all architectures and allows runtime architecture detection."
8686 }
0 commit comments