Update gradle wrapper and build tools
BuildConfig.VERSION_NAME is not available anymore when building library Also replace JCenter by MavenCentral
This commit is contained in:
parent
dbbf467075
commit
4d2522a65c
8 changed files with 26 additions and 38 deletions
|
@ -120,8 +120,7 @@ endorsed by the Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
First: bump version numbers in ``common.mk``, ``CMakeLists.txt``,
|
First: bump version numbers in ``common.mk``, ``CMakeLists.txt``,
|
||||||
``javascript/package.json``, ``python/olm/__version__.py``, ``OLMKit.podspec``, ``Package.swift``,
|
``javascript/package.json``, ``python/olm/__version__.py``, ``OLMKit.podspec``, ``Package.swift``,
|
||||||
and ``android/olm-sdk/build.gradle`` (``versionCode``, ``versionName`` and
|
and ``android/olm-sdk/java/org/matrix/olm/OlmManager.java`` in function ``getVersion()```.
|
||||||
``version``).
|
|
||||||
|
|
||||||
Also, ensure the changelog is up to date, and that everything is committed to
|
Also, ensure the changelog is up to date, and that everything is committed to
|
||||||
git.
|
git.
|
||||||
|
|
|
@ -24,6 +24,6 @@ Development
|
||||||
-----------
|
-----------
|
||||||
import the project from the ``android/`` path.
|
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.
|
The project contains some tests under AndroidTests package.
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
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
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
@ -15,7 +15,7 @@ buildscript {
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#Thu Oct 13 09:38:01 CEST 2016
|
#Thu Oct 13 09:38:01 CEST 2016
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
|
||||||
|
distributionSha256Sum=81003f83b0056d20eedf48cddd4f52a9813163d4ba185bcf8abd34b8eeea4cbd
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
|
|
||||||
|
|
|
@ -3,14 +3,11 @@ import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 30
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 11
|
minSdkVersion 11
|
||||||
targetSdkVersion 28
|
targetSdkVersion 30
|
||||||
versionCode 322
|
|
||||||
versionName "3.2.2"
|
|
||||||
version "3.2.2"
|
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
@ -34,7 +31,7 @@ android {
|
||||||
jni.srcDirs = []
|
jni.srcDirs = []
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildJavaDoc(type: Javadoc) {
|
task buildJavaDoc(type: Javadoc) {
|
||||||
source = android.sourceSets.main.java.srcDirs
|
source = android.sourceSets.main.java.srcDirs
|
||||||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
||||||
destinationDir = file("./doc/")
|
destinationDir = file("./doc/")
|
||||||
|
@ -60,14 +57,15 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
compileTask -> if (compileTask.name.startsWith('compileDebugJava')) {
|
compileTask ->
|
||||||
println 'test compile: Debug'
|
if (compileTask.name.startsWith('compileDebugJava')) {
|
||||||
compileTask.dependsOn ndkBuildNativeDebug
|
println 'test compile: Debug'
|
||||||
} else if (compileTask.name.startsWith('compileReleaseJava')) {
|
compileTask.dependsOn ndkBuildNativeDebug
|
||||||
println 'test compile: Release'
|
} else if (compileTask.name.startsWith('compileReleaseJava')) {
|
||||||
compileTask.dependsOn ndkBuildNativeRelease
|
println 'test compile: Release'
|
||||||
}
|
compileTask.dependsOn ndkBuildNativeRelease
|
||||||
compileTask.dependsOn buildJavaDoc
|
}
|
||||||
|
compileTask.dependsOn buildJavaDoc
|
||||||
}
|
}
|
||||||
|
|
||||||
clean.dependsOn cleanNative
|
clean.dependsOn cleanNative
|
||||||
|
@ -117,9 +115,9 @@ def gitRevisionDate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'junit:junit:4.12'
|
androidTestImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'com.android.support:support-annotations:28.0.0'
|
|
||||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
androidTestImplementation 'androidx.test:runner:1.3.0'
|
||||||
androidTestImplementation 'com.android.support.test:rules:1.0.2'
|
androidTestImplementation 'androidx.test:rules:1.3.0'
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest package="org.matrix.olm" />
|
||||||
package="org.matrix.olm">
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:allowBackup="true"
|
|
||||||
android:label="@string/app_name">
|
|
||||||
</application>
|
|
||||||
</manifest>
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class OlmManager {
|
||||||
* @return the library version
|
* @return the library version
|
||||||
*/
|
*/
|
||||||
public String getVersion() {
|
public String getVersion() {
|
||||||
return BuildConfig.VERSION_NAME;
|
return "3.2.2";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
<resources>
|
|
||||||
<string name="app_name">OlmSdk</string>
|
|
||||||
</resources>
|
|
Loading…
Reference in a new issue