You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 514edd5
Browse filesBrowse the repository at this point in the historyBrowse files
* Adapted from https://github.com/androidx/androidx/blob/c799cba927a71f01ea6b421a8f83c181682633fb/buildSrc/private/src/main/kotlin/androidx/build/MavenUploadHelper.kt#L524-L549
3
+
*
4
+
* Copyright 2018 The Android Open Source Project
5
+
*
6
+
* Licensed under the Apache License, Version 2.0 (the "License");
7
+
* you may not use this file except in compliance with the License.
8
+
* You may obtain a copy of the License at
9
+
*
10
+
* http://www.apache.org/licenses/LICENSE-2.0
11
+
*
12
+
* Unless required by applicable law or agreed to in writing, software
13
+
* distributed under the License is distributed on an "AS IS" BASIS,
14
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+
* See the License for the specific language governing permissions and
* Adapted from https://github.com/androidx/androidx/blob/c799cba927a71f01ea6b421a8f83c181682633fb/buildSrc/private/src/main/kotlin/androidx/build/MavenUploadHelper.kt#L524-L549
223
-
*
224
-
* Copyright 2018 The Android Open Source Project
225
-
*
226
-
* Licensed under the Apache License, Version 2.0 (the "License");
227
-
* you may not use this file except in compliance with the License.
228
-
* You may obtain a copy of the License at
229
-
*
230
-
* http://www.apache.org/licenses/LICENSE-2.0
231
-
*
232
-
* Unless required by applicable law or agreed to in writing, software
233
-
* distributed under the License is distributed on an "AS IS" BASIS,
234
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
235
-
* See the License for the specific language governing permissions and
236
-
* limitations under the License.
237
-
*/
238
-
239
-
// Workaround for https://github.com/gradle/gradle/issues/3170
240
-
fun MavenPublishBaseExtension.assignAarTypes() {
241
-
pom {
242
-
withXml {
243
-
val dependencies = asNode().children().find {
244
-
it isNode&& it.name().toString().endsWith("dependencies")
245
-
} asNode?
246
-
247
-
dependencies?.children()?.forEach { dep ->
248
-
if (dep !isNode) {
249
-
return@forEach
250
-
}
251
-
val group = dep.children().firstOrNull {
252
-
it isNode&& it.name().toString().endsWith("groupId")
253
-
} as?Node
254
-
val groupValue = group?.children()?.firstOrNull() as?String
255
-
256
-
val artifactId = dep.children().firstOrNull {
257
-
it isNode&& it.name().toString().endsWith("artifactId")
258
-
} as?Node
259
-
val artifactIdValue = artifactId?.children()?.firstOrNull() as?String
260
-
261
-
if (artifactIdValue inConfig.BuildScript.androidLibs) {
0 commit comments