diff --git a/README.md b/README.md index 2f39814..9224638 100644 --- a/README.md +++ b/README.md @@ -120,8 +120,7 @@ endorsed by the Matrix.org Foundation C.I.C. First: bump version numbers in ``common.mk``, ``CMakeLists.txt``, ``javascript/package.json``, ``python/olm/__version__.py``, ``OLMKit.podspec``, ``Package.swift``, -and ``android/olm-sdk/build.gradle`` (``versionCode``, ``versionName`` and -``version``). +and ``android/olm-sdk/java/org/matrix/olm/OlmManager.java`` in function ``getVersion()```. Also, ensure the changelog is up to date, and that everything is committed to git. diff --git a/android/README.rst b/android/README.rst index 46beaab..c52a2ca 100644 --- a/android/README.rst +++ b/android/README.rst @@ -24,6 +24,6 @@ Development ----------- import the project from the ``android/`` path. -The project contains some JNI files and some Java wraper files. +The project contains some JNI files and some Java wrapper files. The project contains some tests under AndroidTests package. diff --git a/android/build.gradle b/android/build.gradle index ad6a928..da25888 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,11 +2,11 @@ buildscript { repositories { - jcenter() + mavenCentral() google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.3' + classpath 'com.android.tools.build:gradle:4.1.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -15,7 +15,7 @@ buildscript { allprojects { repositories { - jcenter() + mavenCentral() google() } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 87043e3..cef25cd 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ #Thu Oct 13 09:38:01 CEST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip +distributionSha256Sum=81003f83b0056d20eedf48cddd4f52a9813163d4ba185bcf8abd34b8eeea4cbd zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip diff --git a/android/olm-sdk/build.gradle b/android/olm-sdk/build.gradle index f0e7a03..294e00e 100644 --- a/android/olm-sdk/build.gradle +++ b/android/olm-sdk/build.gradle @@ -3,14 +3,11 @@ import org.apache.tools.ant.taskdefs.condition.Os apply plugin: 'com.android.library' android { - compileSdkVersion 28 + compileSdkVersion 30 defaultConfig { minSdkVersion 11 - targetSdkVersion 28 - versionCode 322 - versionName "3.2.2" - version "3.2.2" + targetSdkVersion 30 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { @@ -34,7 +31,7 @@ android { jni.srcDirs = [] } - task buildJavaDoc(type: Javadoc) { + task buildJavaDoc(type: Javadoc) { source = android.sourceSets.main.java.srcDirs classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) destinationDir = file("./doc/") @@ -60,14 +57,15 @@ android { } tasks.withType(JavaCompile) { - compileTask -> if (compileTask.name.startsWith('compileDebugJava')) { - println 'test compile: Debug' - compileTask.dependsOn ndkBuildNativeDebug - } else if (compileTask.name.startsWith('compileReleaseJava')) { - println 'test compile: Release' - compileTask.dependsOn ndkBuildNativeRelease - } - compileTask.dependsOn buildJavaDoc + compileTask -> + if (compileTask.name.startsWith('compileDebugJava')) { + println 'test compile: Debug' + compileTask.dependsOn ndkBuildNativeDebug + } else if (compileTask.name.startsWith('compileReleaseJava')) { + println 'test compile: Release' + compileTask.dependsOn ndkBuildNativeRelease + } + compileTask.dependsOn buildJavaDoc } clean.dependsOn cleanNative @@ -117,9 +115,9 @@ def gitRevisionDate() { } dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support:support-annotations:28.0.0' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test:rules:1.0.2' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'junit:junit:4.13.2' + + androidTestImplementation 'androidx.test:runner:1.3.0' + androidTestImplementation 'androidx.test:rules:1.3.0' } diff --git a/android/olm-sdk/src/main/AndroidManifest.xml b/android/olm-sdk/src/main/AndroidManifest.xml index 902f2e3..e8a38cc 100644 --- a/android/olm-sdk/src/main/AndroidManifest.xml +++ b/android/olm-sdk/src/main/AndroidManifest.xml @@ -1,8 +1 @@ - - - - - + diff --git a/android/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java b/android/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java index cd33a5a..c89edda 100644 --- a/android/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java +++ b/android/olm-sdk/src/main/java/org/matrix/olm/OlmManager.java @@ -46,7 +46,7 @@ public class OlmManager { * @return the library version */ public String getVersion() { - return BuildConfig.VERSION_NAME; + return "3.2.2"; } /** diff --git a/android/olm-sdk/src/main/res/values/strings.xml b/android/olm-sdk/src/main/res/values/strings.xml deleted file mode 100644 index 93bea1d..0000000 --- a/android/olm-sdk/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - OlmSdk -