Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/0.9.19'
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Mar 25, 2019
2 parents 700f2ed + 2fe8321 commit d3179a4
Show file tree
Hide file tree
Showing 47 changed files with 393 additions and 124 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android:
- build-tools-28.0.3

# The SDK version used to compile your project
- android-27
- android-28

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand Down
12 changes: 12 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Changes to Matrix Android SDK in 0.9.19 (2019-03-25)
=======================================================

Improvements:
- Fix partially shared session (#446)

Bugfix:
- Fix regression on ToDevice requests, sent with empty object

Build:
- Upgrade kotlin, library dependencies, targetSdk and gradle version

Changes to Matrix Android SDK in 0.9.18 (2019-03-07)
=======================================================

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.10'
ext.kotlin_version = '1.3.21'

repositories {
google()
Expand All @@ -11,7 +11,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2'
Expand Down
11 changes: 4 additions & 7 deletions generateJavadoc.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#!/usr/bin/env bash

echo "Delete /docs..."
rm -rf ./docs

echo "Generate Javadoc..."
./gradlew releaseDocs
./gradlew generateReleaseJavadoc --stacktrace

echo "Compress..."
cd ./docs
tar -zcvf matrix-sdk-javadoc.tar.gz ./javadoc/
cd ..
cd ./matrix-sdk/build/docs/
tar -zcvf ../../matrix-sdk-javadoc.tar.gz ./javadoc/
cd -

echo "Success!"
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Oct 17 13:09:29 CEST 2017
#Fri Mar 22 10:44:08 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
41 changes: 20 additions & 21 deletions matrix-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ buildscript {
}

dependencies {
classpath "io.realm:realm-gradle-plugin:5.8.0"
classpath "io.realm:realm-gradle-plugin:5.9.0"
}
}

android {
compileSdkVersion 27
compileSdkVersion 28

packagingOptions {
exclude 'LICENSE.txt'
Expand All @@ -26,9 +26,9 @@ android {

defaultConfig {
minSdkVersion 16
targetSdkVersion 26
versionCode 918
versionName "0.9.18"
targetSdkVersion 28
versionCode 919
versionName "0.9.19"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand All @@ -44,24 +44,23 @@ android {
}

android.libraryVariants.all { variant ->
task("${variant.name}Docs", type: Javadoc) {
source = variant.javaCompiler.source
task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath = files(((Object) android.bootClasspath.join(File.pathSeparator)))
// Comment this line else we get a gradle error:
// Cannot create variant 'android-lint' after configuration ':matrix-sdk:debugRuntimeElements' has been resolved
// Javadoc is still well generated without this line
// classpath += files(variant.javaCompiler.classpath.files)

destinationDir = file("../docs/javadoc/")
delete "../docs/"

options.windowTitle("Matrix Android SDK")
options.docTitle("Matrix Android SDK")
options.header("<b>Matrix Android SDK</b>")
options.bottom("&copy; 2017 Vector Creations Ltd All rights reserved.")
options.windowTitle("Matrix Android SDK ${defaultConfig.versionName}")
options.docTitle("Matrix Android SDK ${defaultConfig.versionName}<br/><i>Please note that Kotlin files are not part of the Javadoc</i>")
options.header("<b>Matrix Android SDK ${defaultConfig.versionName}</b><br/><i>Please note that Kotlin files are not part of the Javadoc</i>")
options.bottom("&copy; 2019 New Vector Ltd All rights reserved.")

exclude '**/BuildConfig.java'
exclude '**/R.java'
// Exclude all kotlin files from javadoc file (it does not work and make the task fails).
excludes = ['**/*.kt']
failOnError false
}
}
Expand Down Expand Up @@ -164,13 +163,13 @@ dependencies {
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:preference-v7:27.1.1'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:preference-v7:28.0.0'

implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
Expand All @@ -186,15 +185,15 @@ dependencies {
// Test
testImplementation 'com.android.support.test:runner:1.0.2'
testImplementation 'com.android.support.test:rules:1.0.2'
testImplementation 'org.mockito:mockito-core:2.7.22'
testImplementation 'org.mockito:mockito-core:2.23.0'
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation 'org.apache.maven:maven-ant-tasks:2.1.3' // fixes issue on linux/mac
testImplementation "org.robolectric:robolectric:3.8"
testImplementation "org.robolectric:robolectric:4.0.2"

// Robolectric
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support:support-annotations:27.1.1'
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'
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ class MockOkHttpInterceptor : Interceptor {

rules.forEach { rule ->
if (originalRequest.url().toString().contains(rule.match)) {
return rule.process(originalRequest)
rule.process(originalRequest )?.let {
return it
}
}
}

Expand All @@ -56,7 +58,7 @@ class MockOkHttpInterceptor : Interceptor {


abstract class Rule(val match: String) {
abstract fun process(originalRequest: Request): Response
abstract fun process(originalRequest: Request): Response?
}

/**
Expand All @@ -66,7 +68,7 @@ class MockOkHttpInterceptor : Interceptor {
private val code: Int = HttpsURLConnection.HTTP_OK,
private val body: String = "{}") : Rule(match) {

override fun process(originalRequest: Request): Response {
override fun process(originalRequest: Request): Response? {
return Response.Builder()
.protocol(Protocol.HTTP_1_1)
.request(originalRequest)
Expand Down
Loading

0 comments on commit d3179a4

Please sign in to comment.