diff --git a/OsmAnd/AndroidManifest-library.xml b/OsmAnd/AndroidManifest-library.xml
new file mode 100644
index 0000000000..379f1ce963
--- /dev/null
+++ b/OsmAnd/AndroidManifest-library.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OsmAnd/build.gradle.lib b/OsmAnd/build.gradle.lib
index b70a881218..0f2fefae73 100644
--- a/OsmAnd/build.gradle.lib
+++ b/OsmAnd/build.gradle.lib
@@ -1,23 +1,5 @@
-//apply plugin: 'com.android.application'
apply plugin: 'com.android.library'
-// Global Parameters accepted
-// TARGET_APP_NAME - app name
-// APK_NUMBER_VERSION - version number of apk
-// APK_VERSION_SUFFIX - build number like #99999Z, appended (for dev builds) to Manifest's versionName as X.X.X#99999Z
-// Z means flavor: M=-master, D=-main-default, B=-Blackberry, Des=-design, MQA=-main-qt-arm, MQDA=-main-qt-default-arm, S=-sherpafy
-// APP_EDITION - date stamp of builds
-// APP_FEATURES - features +play_market +gps_status -parking_plugin -blackberry -free_version -amazon
-
-// 1. To be done Filter fonts
-//
-//
-//
-//
-//
-//
-// Less important
-
task printc {
configurations.each { if(it.isCanBeResolved()) println it.name }
}
@@ -27,67 +9,21 @@ android {
buildToolsVersion "29.0.3"
// compileNdkVersion "android-ndk-r17b"
- signingConfigs {
- development {
- storeFile file("../keystores/debug.keystore")
- storePassword "android"
- keyAlias "androiddebugkey"
- keyPassword "android"
- }
-
- publishing {
- storeFile file("/var/lib/jenkins/osmand_key")
- storePassword System.getenv("OSMAND_APK_PASSWORD")
- keyAlias "osmand"
- keyPassword System.getenv("OSMAND_APK_PASSWORD")
- }
- }
-
defaultConfig {
- minSdkVersion System.getenv("MIN_SDK_VERSION") ? System.getenv("MIN_SDK_VERSION").toInteger() : 15
+ minSdkVersion 15
targetSdkVersion 29
- versionCode 390
- versionCode System.getenv("APK_NUMBER_VERSION") ? System.getenv("APK_NUMBER_VERSION").toInteger() : versionCode
multiDexEnabled true
- versionName "3.9.0"
- versionName System.getenv("APK_VERSION")? System.getenv("APK_VERSION").toString(): versionName
- versionName System.getenv("APK_VERSION_SUFFIX")? versionName + System.getenv("APK_VERSION_SUFFIX").toString(): versionName
- // Stops the Gradle plugin’s automatic rasterization of vectors
- // vectorDrawables.generatedDensities = ['hdpi']
vectorDrawables.useSupportLibrary = true
}
lintOptions {
- lintConfig file("lint.xml")
abortOnError false
- warningsAsErrors false
}
- /*
- bundle {
- language {
- // Specifies that the app bundle should not support
- // configuration APKs for language resources. These
- // resources are instead packaged with each base and
- // dynamic feature APK.
- enableSplit = false
- }
- }
- */
- // related to kuromoji
- //packagingOptions {
- // exclude '/META-INF/CONTRIBUTORS.md'
- // exclude '/META-INF/LICENSE.md'
- // exclude '/META-INF/NOTICE.md'
- //}
-
- // This is from OsmAndCore_android.aar - for some reason it's not inherited
aaptOptions {
// Don't compress any embedded resources
noCompress "qz"
cruncherEnabled = false
- // Flag notifies aapt to keep the attribute IDs around
- // additionalParameters "--no-version-vectors"
}
dexOptions {
@@ -96,7 +32,7 @@ android {
sourceSets {
main {
- manifest.srcFile "AndroidManifest.xml"
+ manifest.srcFile "AndroidManifest-library.xml"
jni.srcDirs = []
jniLibs.srcDirs = ["libs"]
aidl.srcDirs = ["src"]
@@ -107,25 +43,8 @@ android {
assets.srcDirs = ["assets"]
}
debug {
- manifest.srcFile "AndroidManifest-debug.xml"
}
- /*
- full {
- java.srcDirs = ["src-google"]
- }
- free {
- java.srcDirs = ["src-google"]
- manifest.srcFile "AndroidManifest-free.xml"
- }
- freedev {
- java.srcDirs = ["src-google"]
- manifest.srcFile "AndroidManifest-freedev.xml"
- }
- freehuawei {
- java.srcDirs = ["src-huawei"]
- manifest.srcFile "AndroidManifest-freehuawei.xml"
- }
- */
+
legacy {
jniLibs.srcDirs = ["libc++"]
}
@@ -165,70 +84,27 @@ android {
}
}
- /*
- // Version
- freedev {
- dimension "version"
- applicationId "net.osmand.dev"
- // resConfig "en"
- }
- free {
- dimension "version"
- applicationId "net.osmand"
- }
- full {
- dimension "version"
- applicationId "net.osmand.plus"
- }
- freehuawei {
- dimension "version"
- applicationId "net.osmand.huawei"
- }
- */
// CoreVersion
// Build that doesn't include 3D OpenGL
legacy {
dimension "coreversion"
}
- // Build that includes 3D OpenGL release
- qtcore {
- dimension "coreversion"
- }
- // Build that includes 3D OpenGL debug
- qtcoredebug {
- dimension "coreversion"
- }
}
buildTypes {
debug {
- buildConfigField "String", "OPR_BASE_URL", "\"https://test.openplacereviews.org/\""
- buildConfigField "String", "OSM_OAUTH_CONSUMER_KEY", "\"Ti2qq3fo4i4Wmuox3SiWRIGq3obZisBHnxmcM05y\""
- buildConfigField "String", "OSM_OAUTH_CONSUMER_SECRET", "\"lxulb3HYoMmd2cC4xxNe1dyfRMAY8dS0eNihJ0DM\""
- signingConfig signingConfigs.development
+ debuggable true
}
+
release {
- buildConfigField "String", "OPR_BASE_URL", "\"https://test.openplacereviews.org/\""
- buildConfigField "String", "OSM_OAUTH_CONSUMER_KEY", "\"Ti2qq3fo4i4Wmuox3SiWRIGq3obZisBHnxmcM05y\""
- buildConfigField "String", "OSM_OAUTH_CONSUMER_SECRET", "\"lxulb3HYoMmd2cC4xxNe1dyfRMAY8dS0eNihJ0DM\""
- signingConfig signingConfigs.publishing
+ debuggable false
}
}
-
}
def replaceNoTranslate(line) {
- if (line.contains("\"app_name\"") && System.getenv("TARGET_APP_NAME")) {
- return line.replaceAll(">[^<]*<", ">" + System.getenv("TARGET_APP_NAME") + "<")
- }
- if (line.contains("\"app_name_free\"") && System.getenv("TARGET_APP_NAME")) {
- return line.replaceAll(">[^<]*<", ">" + System.getenv("TARGET_APP_NAME") + "<")
- }
- if (line.contains("\"app_edition\"") && System.getenv("APP_EDITION")) {
- return line.replaceAll(">[^<]*<", ">" + System.getenv("APP_EDITION") + "<")
- }
- if (line.contains("\"versionFeatures\"") && System.getenv("APP_FEATURES")) {
- return line.replaceAll(">[^<]*<", ">" + System.getenv("APP_FEATURES") + "<")
+ if (line.contains("\"versionFeatures\"")) {
+ return line.replaceAll(">[^<]*<", ">" + "" + "<")
}
return line;
}
@@ -402,6 +278,8 @@ task collectExternalResources {
// Legacy core build
import org.apache.tools.ant.taskdefs.condition.Os
+import java.util.regex.Pattern
+
task buildOsmAndCore(type: Exec) {
Gradle gradle = getGradle()
String tskReqStr = gradle.getStartParameter().getTaskRequests().toString().toLowerCase()
@@ -452,11 +330,6 @@ afterEvaluate {
android.libraryVariants.all { variant ->
variant.javaCompiler.dependsOn(collectExternalResources, buildOsmAndCore, cleanupDuplicatesInCore)
}
- Gradle gradle = getGradle()
- String tskReqStr = gradle.getStartParameter().getTaskRequests().toString().toLowerCase()
- if (tskReqStr.contains("huawei")) {
- apply plugin: 'com.huawei.agconnect'
- }
}
task appStart(type: Exec) {
@@ -466,6 +339,27 @@ task appStart(type: Exec) {
// commandLine 'cmd', '/c', 'adb', 'shell', 'am', 'start', '-n', 'net.osmand.plus/net.osmand.plus.activities.MapActivity'
}
+// Uploading artifacts to local path
+group = "net.osmand"
+uploadArchives {
+ repositories.ivy {
+ // credentials {
+ // username ""
+ // password ""
+ // }
+ url = "/Users/alexey/tmp/ivy";//System.getenv("OSMAND_BINARIES_IVY_ROOT") ?: "./"
+ layout "pattern" , {
+ artifact "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
+ }
+
+// def gitInfo = "git describe --long".execute().text.trim()
+// def parsedGitInfo = Pattern.compile("v(\\d+\\.\\d+)-([\\d.]+)-(\\w+)").matcher(gitInfo)
+// assert parsedGitInfo.matches()
+// version = parsedGitInfo.group(1) + "-SNAPSHOT"
+ version = "1.0"
+ }
+}
+
dependencies {
implementation project(path: ':OsmAnd-java', configuration: 'android')
implementation project(':OsmAnd-api')
@@ -497,14 +391,14 @@ dependencies {
// implementation 'com.ibm.icu:icu4j:50.1'
// implementation 'net.sf.trove4j:trove4j:3.0.3'
- qtcoreImplementation fileTree(include: ['QtAndroid.jar', 'QtAndroidBearer.jar'], dir: 'libs')
- qtcoredebugImplementation fileTree(include: ['QtAndroid.jar', 'QtAndroidBearer.jar'], dir: 'libs')
+// qtcoreImplementation fileTree(include: ['QtAndroid.jar', 'QtAndroidBearer.jar'], dir: 'libs')
+// qtcoredebugImplementation fileTree(include: ['QtAndroid.jar', 'QtAndroidBearer.jar'], dir: 'libs')
legacyImplementation "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@jar"
- qtcoredebugImplementation "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"
- qtcoredebugImplementation "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
- qtcoreImplementation "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
- qtcoreImplementation "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
+// qtcoredebugImplementation "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"
+// qtcoredebugImplementation "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
+// qtcoreImplementation "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
+// qtcoreImplementation "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
implementation ("com.getkeepsafe.taptargetview:taptargetview:1.12.0"){
exclude group: 'com.android.support'
}
@@ -516,6 +410,4 @@ dependencies {
exclude group: "com.fasterxml.jackson.core"
}
implementation 'com.jaredrummler:colorpicker:1.1.0'
-
- //freehuaweiImplementation 'com.huawei.hms:iap:5.0.2.300'
}