Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix: android build

ilian606ddecc1359
diff --git a/cordova/platforms/android/CordovaLib/build.gradle b/cordova/platforms/android/CordovaLib/build.gradle
index 25cca89e6..42978a2f0 100644
--- a/cordova/platforms/android/CordovaLib/build.gradle
+++ b/cordova/platforms/android/CordovaLib/build.gradle
@@ -37,7 +37,6 @@ buildscript {
// studio comes out
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
- classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
@@ -48,7 +47,6 @@ allprojects {
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
-apply plugin: 'com.jfrog.bintray'
group = 'org.apache.cordova'
version = '9.1.0'
@@ -126,25 +124,3 @@ artifacts {
archives sourcesJar
}
-bintray {
- user = System.getenv('BINTRAY_USER')
- key = System.getenv('BINTRAY_KEY')
- configurations = ['archives']
- pkg {
- repo = 'maven'
- name = 'cordova-android'
- userOrg = 'cordova'
- licenses = ['Apache-2.0']
- vcsUrl = 'https://github.com/apache/cordova-android'
- websiteUrl = 'https://cordova.apache.org'
- issueTrackerUrl = 'https://github.com/apache/cordova-android/issues'
- publicDownloadNumbers = true
- licenses = ['Apache-2.0']
- labels = ['android', 'cordova', 'phonegap']
- version {
- name = '9.1.0'
- released = new Date()
- vcsTag = '9.1.0'
- }
- }
-}
diff --git a/cordova/platforms/android/CordovaLib/cordova.gradle b/cordova/platforms/android/CordovaLib/cordova.gradle
index 36750b68f..feee63fc1 100644
--- a/cordova/platforms/android/CordovaLib/cordova.gradle
+++ b/cordova/platforms/android/CordovaLib/cordova.gradle
@@ -19,7 +19,38 @@
import java.util.regex.Pattern
import groovy.swing.SwingBuilder
-import com.g00fy2.versioncompare.Version
+
+// Replacement for com.g00fy2:versioncompare (no longer available on JCenter)
+class Version implements Comparable<Version> {
+ private final String original
+ private final List<Integer> parts
+
+ Version(String version) {
+ this.original = version ?: '0.0.0'
+ this.parts = this.original.tokenize('.').collect {
+ try { it.replaceAll('[^0-9].*', '').toInteger() } catch (e) { 0 }
+ }
+ }
+
+ boolean isEqual(String other) { compareTo(new Version(other)) == 0 }
+ boolean isHigherThan(String other) { compareTo(new Version(other)) > 0 }
+ boolean isLowerThan(String other) { compareTo(new Version(other)) < 0 }
+ String getOriginalString() { original }
+
+ @Override
+ int compareTo(Version other) {
+ int maxLen = Math.max(parts.size(), other.parts.size())
+ for (int i = 0; i < maxLen; i++) {
+ int a = i < parts.size() ? parts[i] : 0
+ int b = i < other.parts.size() ? other.parts[i] : 0
+ if (a != b) return a <=> b
+ }
+ return 0
+ }
+
+ @Override
+ String toString() { original }
+}
String doEnsureValueExists(filePath, props, key) {
if (props.get(key) == null) {
@@ -192,14 +223,6 @@ ext {
cdvHelpers.getConfigXml = { doGetConfigXml() }
// Returns the value for the desired <preference>. Added in 4.1.0.
cdvHelpers.getConfigPreference = { name, defaultValue -> doGetConfigPreference(name, defaultValue) }
-}
-
-buildscript {
- repositories {
- jcenter()
- }
-
- dependencies {
- classpath 'com.g00fy2:versioncompare:1.3.4@jar'
- }
+ // isVersionValid exposed for use in build.gradle
+ cdvHelpers.isVersionValid = { version -> isVersionValid(version) }
}
diff --git a/cordova/platforms/android/CordovaLib/repositories.gradle b/cordova/platforms/android/CordovaLib/repositories.gradle
index 1384d1457..3a397a83e 100644
--- a/cordova/platforms/android/CordovaLib/repositories.gradle
+++ b/cordova/platforms/android/CordovaLib/repositories.gradle
@@ -17,6 +17,7 @@
*/
ext.repos = {
+ mavenCentral()
google()
- jcenter()
+ maven { url 'https://jitpack.io' }
}
diff --git a/cordova/platforms/android/android.json b/cordova/platforms/android/android.json
index b539cdde4..8f9d9e495 100644
--- a/cordova/platforms/android/android.json
+++ b/cordova/platforms/android/android.json
@@ -10,11 +10,11 @@
"/manifest/application/activity": [
{
"xml": "<intent-filter><action android:name=\"android.intent.action.VIEW\" /><category android:name=\"android.intent.category.DEFAULT\" /><category android:name=\"android.intent.category.BROWSABLE\" /><data android:mimeType=\"application/pdf\" android:scheme=\"file\" /><data android:mimeType=\"text/plain\" android:scheme=\"file\" /><data android:mimeType=\"image/x-windows-bmp\" android:scheme=\"file\" /><data android:mimeType=\"image/gif\" android:scheme=\"file\" /><data android:mimeType=\"image/png\" android:scheme=\"file\" /><data android:mimeType=\"image/jpeg\" android:scheme=\"file\" /><data android:mimeType=\"image/webp\" android:scheme=\"file\" /><data android:mimeType=\"video/webm\" android:scheme=\"file\" /><data android:mimeType=\"video/ogg\" android:scheme=\"file\" /><data android:mimeType=\"text/html\" android:scheme=\"file\" /><data android:mimeType=\"application/json\" android:scheme=\"file\" /></intent-filter>",
- "count": 19
+ "count": 35
},
{
"xml": "<intent-filter><action android:name=\"android.intent.action.VIEW\" /><category android:name=\"android.intent.category.DEFAULT\" /><category android:name=\"android.intent.category.BROWSABLE\" /><data android:host=\"*\" android:mimeType=\"*/*\" android:pathPattern=\"..json\" android:scheme=\"file\" /><data android:host=\"*\" android:mimeType=\"*/*\" android:pathPattern=\"..mht\" android:scheme=\"file\" /><data android:host=\"*\" android:mimeType=\"*/*\" android:pathPattern=\"..mhtml\" android:scheme=\"file\" /><data android:host=\"*\" android:mimeType=\"*/*\" android:pathPattern=\"..md\" android:scheme=\"file\" /><data android:host=\"*\" android:mimeType=\"*/*\" android:pathPattern=\"..md.txt\" android:scheme=\"file\" /><data android:host=\"*\" android:mimeType=\"*/*\" android:pathPattern=\"..markdown\" android:scheme=\"file\" /><data android:host=\"*\" android:mimeType=\"*/*\" android:pathPattern=\"..ogv\" android:scheme=\"file\" /></intent-filter>",
- "count": 19
+ "count": 35
},
{
"xml": "<intent-filter><action android:name=\"com.darryncampbell.cordova.plugin.intent.ACTION\" /><category android:name=\"android.intent.category.DEFAULT\" /></intent-filter>",
@@ -45,6 +45,10 @@
{
"xml": "<provider android:authorities=\"${applicationId}.sharing.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"nl.xservices.plugins.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/sharing_paths\" /></provider>",
"count": 1
+ },
+ {
+ "xml": "<provider android:authorities=\"${applicationId}.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"androidx.core.content.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/mnk_file_path\" /></provider>",
+ "count": 16
}
],
"/manifest": [
diff --git a/cordova/platforms/android/app/libs/filepicker-4.2.1.aar b/cordova/platforms/android/app/libs/filepicker-4.2.1.aar
new file mode 100644
index 000000000..2f638922e
Binary files /dev/null and b/cordova/platforms/android/app/libs/filepicker-4.2.1.aar differ
diff --git a/cordova/platforms/android/app/repositories.gradle b/cordova/platforms/android/app/repositories.gradle
index 3661e1311..3a397a83e 100644
--- a/cordova/platforms/android/app/repositories.gradle
+++ b/cordova/platforms/android/app/repositories.gradle
@@ -19,5 +19,5 @@
ext.repos = {
mavenCentral()
google()
- jcenter()
+ maven { url 'https://jitpack.io' }
}
diff --git a/cordova/platforms/android/app/src/main/AndroidManifest.xml b/cordova/platforms/android/app/src/main/AndroidManifest.xml
index 1ede67b86..499325b40 100644
--- a/cordova/platforms/android/app/src/main/AndroidManifest.xml
+++ b/cordova/platforms/android/app/src/main/AndroidManifest.xml
@@ -74,6 +74,51 @@
<provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
</provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
+ <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/mnk_file_path" />
+ </provider>
</application>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
diff --git a/cordova/platforms/android/com.ourcodeworld.plugins.Filebrowser/mobileapp-plugin.gradle b/cordova/platforms/android/com.ourcodeworld.plugins.Filebrowser/mobileapp-plugin.gradle
index 056aa8cbd..5f9144e02 100644
--- a/cordova/platforms/android/com.ourcodeworld.plugins.Filebrowser/mobileapp-plugin.gradle
+++ b/cordova/platforms/android/com.ourcodeworld.plugins.Filebrowser/mobileapp-plugin.gradle
@@ -1,7 +1,6 @@
-repositories {
- jcenter()
-}
-
dependencies {
- compile 'com.nononsenseapps:filepicker:3.1.0'
+ implementation fileTree(dir: '../app/libs', include: ['*.aar'])
+ implementation 'androidx.appcompat:appcompat:1.1.0'
+ implementation 'androidx.recyclerview:recyclerview:1.1.0'
+ implementation 'androidx.core:core:1.0.0'
}
diff --git a/cordova/platforms/android/platform_www/cordova_plugins.js b/cordova/platforms/android/platform_www/cordova_plugins.js
index 6ed6072bc..58781f3aa 100644
--- a/cordova/platforms/android/platform_www/cordova_plugins.js
+++ b/cordova/platforms/android/platform_www/cordova_plugins.js
@@ -271,8 +271,8 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
];
module.exports.metadata = {
"com-darryncampbell-cordova-plugin-intent": "2.0.0",
+ "com.ourcodeworld.plugins.Filebrowser": "1.0.0",
"com.whebcraft.cordova.plugin.downloader": "0.1.0",
- "cordova-plugin-add-swift-support": "2.0.2",
"cordova-plugin-androidx-adapter": "1.1.3",
"cordova-plugin-device": "2.0.3",
"cordova-plugin-background-mode": "0.7.3",
@@ -283,4 +283,4 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
"es6-promise-plugin": "4.2.2",
"cordova-plugin-x-socialsharing": "6.0.3"
};
-});
+});
\ No newline at end of file