From 35ad469f540581b287dc29bbaa8ae9f95cb592e2 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Sun, 29 Nov 2020 16:19:30 +0300 Subject: [PATCH] Fix OsmAnd lib script --- OsmAnd/build.gradle.lib | 103 ++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 61 deletions(-) diff --git a/OsmAnd/build.gradle.lib b/OsmAnd/build.gradle.lib index 39e4a8e56b..bcb0999e91 100644 --- a/OsmAnd/build.gradle.lib +++ b/OsmAnd/build.gradle.lib @@ -1,4 +1,5 @@ apply plugin: 'com.android.library' +apply plugin: 'ivy-publish' task printc { configurations.each { if(it.isCanBeResolved()) println it.name } @@ -338,67 +339,47 @@ task appStart(type: Exec) { // commandLine 'cmd', '/c', 'adb', 'shell', 'am', 'start', '-n', 'net.osmand.plus/net.osmand.plus.activities.MapActivity' } -artifacts { - archives(file("$buildDir/outputs/aar/OsmAnd-legacy-x86-debug.aar")) { - classifier 'legacyX86Debug' - name 'OsmAnd' - extension 'aar' - } - archives(file("$buildDir/outputs/aar/OsmAnd-legacy-x86-release.aar")) { - classifier 'legacyX86Release' - name 'OsmAnd' - extension 'aar' - } - archives(file("$buildDir/outputs/aar/OsmAnd-legacy-arm64-debug.aar")) { - classifier 'legacyArm64Debug' - name 'OsmAnd' - extension 'aar' - } - archives(file("$buildDir/outputs/aar/OsmAnd-legacy-arm64-release.aar")) { - classifier 'legacyArm64Release' - name 'OsmAnd' - extension 'aar' - } - archives(file("$buildDir/outputs/aar/OsmAnd-legacy-armonly-debug.aar")) { - classifier 'legacyArmonlyDebug' - name 'OsmAnd' - extension 'aar' - } - archives(file("$buildDir/outputs/aar/OsmAnd-legacy-armonly-release.aar")) { - classifier 'legacyArmonlyRelease' - name 'OsmAnd' - extension 'aar' - } - archives(file("$buildDir/outputs/aar/OsmAnd-legacy-armv7-debug.aar")) { - classifier 'legacyArmv7Debug' - name 'OsmAnd' - extension 'aar' - } - archives(file("$buildDir/outputs/aar/OsmAnd-legacy-armv7-release.aar")) { - classifier 'legacyArmv7Release' - name 'OsmAnd' - extension 'aar' - } - archives(file("$buildDir/outputs/aar/OsmAnd-legacy-fat-debug.aar")) { - classifier 'legacyFatDebug' - name 'OsmAnd' - extension 'aar' - } - archives(file("$buildDir/outputs/aar/OsmAnd-legacy-fat-release.aar")) { - classifier 'legacyFatRelease' - name 'OsmAnd' - extension 'aar' - } -} - -uploadArchives { - repositories.ivy { - // credentials { - // username "" - // password "" - // } - - url = System.getenv("OSMAND_BINARIES_IVY_ROOT") ?: "./" +project.afterEvaluate { + publishing { + repositories { + ivy { + url = System.getenv("OSMAND_BINARIES_IVY_ROOT") ?: "./" + } + } + publications { + aar(IvyPublication) { + artifact bundleLegacyX86DebugAar { + classifier 'legacyX86Debug' + } + artifact bundleLegacyX86ReleaseAar { + classifier 'legacyX86Release' + } + artifact bundleLegacyArm64DebugAar { + classifier 'legacyArm64Debug' + } + artifact bundleLegacyArm64ReleaseAar { + classifier 'legacyArm64Release' + } + artifact bundleLegacyArmonlyDebugAar { + classifier 'legacyArmonlyDebug' + } + artifact bundleLegacyArmonlyReleaseAar { + classifier 'legacyArmonlyRelease' + } + artifact bundleLegacyArmv7DebugAar { + classifier 'legacyArmv7Debug' + } + artifact bundleLegacyArmv7ReleaseAar { + classifier 'legacyArmv7Release' + } + artifact bundleLegacyFatDebugAar { + classifier 'legacyFatDebug' + } + artifact bundleLegacyFatReleaseAar { + classifier 'legacyFatRelease' + } + } + } } }