Skip to content
This repository was archived by the owner on Jul 30, 2023. It is now read-only.

Commit 4cff68a

Browse files
authored
Merge pull request #71 from sys1yagi/fix_test
Update kotlin.
2 parents 4593a45 + 2f1fcf9 commit 4cff68a

File tree

6 files changed

+22
-31
lines changed

6 files changed

+22
-31
lines changed

build.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
buildscript {
2-
ext.kotlin_version = '1.2.50'
2+
ext.kotlin_version = '1.2.51'
33
ext.supportTestVersion = '0.5'
44
ext.okhttpVersion = '3.6.0'
5-
ext.gradleToolsVersion = '3.1.3'
65
ext.rxJavaVersion = '2.0.8'
76
ext.gsonVersion = '2.8.0'
87

@@ -11,17 +10,15 @@ buildscript {
1110
}
1211

1312
dependencies {
14-
classpath "com.android.tools.build:gradle:$gradleToolsVersion"
1513
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1614
classpath 'com.github.ben-manes:gradle-versions-plugin:0.14.0'
17-
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.1'
1815
}
1916
}
2017
apply plugin: 'kotlin'
2118
apply plugin: 'maven'
2219

2320
group = "com.sys1yagi"
24-
version = '1.5.0'
21+
version = '1.6.0'
2522

2623
allprojects {
2724
repositories {

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip

mastodon4j-rx/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ dependencies {
2020
testCompile 'org.mockito:mockito-core:2.7.22'
2121
}
2222

23-
sourceCompatibility = "1.7"
24-
targetCompatibility = "1.7"
25-
2623
buildscript {
2724
repositories {
2825
mavenCentral()

mastodon4j-rx/src/main/java/com/sys1yagi/mastodon4j/rx/RxAccounts.kt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class RxAccounts(client: MastodonClient) {
1818
try {
1919
val account = accounts.getAccount(accountId).execute()
2020
it.onSuccess(account)
21-
} catch(throwable: Throwable) {
21+
} catch (throwable: Throwable) {
2222
it.onErrorIfNotDisposed(throwable)
2323
}
2424
}
@@ -29,7 +29,7 @@ class RxAccounts(client: MastodonClient) {
2929
try {
3030
val credential = accounts.getVerifyCredentials().execute()
3131
it.onSuccess(credential)
32-
} catch(throwable: Throwable) {
32+
} catch (throwable: Throwable) {
3333
it.onErrorIfNotDisposed(throwable)
3434
}
3535
}
@@ -40,7 +40,7 @@ class RxAccounts(client: MastodonClient) {
4040
try {
4141
val credential = accounts.updateCredential(displayName, note, avatar, header).execute()
4242
it.onSuccess(credential)
43-
} catch(throwable: Throwable) {
43+
} catch (throwable: Throwable) {
4444
it.onErrorIfNotDisposed(throwable)
4545
}
4646
}
@@ -51,7 +51,7 @@ class RxAccounts(client: MastodonClient) {
5151
try {
5252
val followers = accounts.getFollowers(accountId, range).execute()
5353
it.onSuccess(followers)
54-
} catch(throwable: Throwable) {
54+
} catch (throwable: Throwable) {
5555
it.onErrorIfNotDisposed(throwable)
5656
}
5757
}
@@ -62,7 +62,7 @@ class RxAccounts(client: MastodonClient) {
6262
try {
6363
val following = accounts.getFollowing(accountId, range).execute()
6464
it.onSuccess(following)
65-
} catch(throwable: Throwable) {
65+
} catch (throwable: Throwable) {
6666
it.onErrorIfNotDisposed(throwable)
6767
}
6868
}
@@ -71,9 +71,9 @@ class RxAccounts(client: MastodonClient) {
7171
fun getStatuses(accountId: Long, onlyMedia: Boolean, range: Range): Single<Pageable<Status>> {
7272
return Single.create {
7373
try {
74-
val statuses = accounts.getStatuses(accountId, onlyMedia, range).execute()
74+
val statuses = accounts.getStatuses(accountId, onlyMedia, range = range).execute()
7575
it.onSuccess(statuses)
76-
} catch(throwable: Throwable) {
76+
} catch (throwable: Throwable) {
7777
it.onErrorIfNotDisposed(throwable)
7878
}
7979
}
@@ -84,7 +84,7 @@ class RxAccounts(client: MastodonClient) {
8484
try {
8585
val relationship = accounts.postFollow(accountId).execute()
8686
it.onSuccess(relationship)
87-
} catch(throwable: Throwable) {
87+
} catch (throwable: Throwable) {
8888
it.onErrorIfNotDisposed(throwable)
8989
}
9090
}
@@ -95,7 +95,7 @@ class RxAccounts(client: MastodonClient) {
9595
try {
9696
val relationship = accounts.postUnFollow(accountId).execute()
9797
it.onSuccess(relationship)
98-
} catch(throwable: Throwable) {
98+
} catch (throwable: Throwable) {
9999
it.onErrorIfNotDisposed(throwable)
100100
}
101101
}
@@ -106,7 +106,7 @@ class RxAccounts(client: MastodonClient) {
106106
try {
107107
val relationship = accounts.postBlock(accountId).execute()
108108
it.onSuccess(relationship)
109-
} catch(throwable: Throwable) {
109+
} catch (throwable: Throwable) {
110110
it.onErrorIfNotDisposed(throwable)
111111
}
112112
}
@@ -117,7 +117,7 @@ class RxAccounts(client: MastodonClient) {
117117
try {
118118
val relationship = accounts.postUnblock(accountId).execute()
119119
it.onSuccess(relationship)
120-
} catch(throwable: Throwable) {
120+
} catch (throwable: Throwable) {
121121
it.onErrorIfNotDisposed(throwable)
122122
}
123123
}
@@ -128,7 +128,7 @@ class RxAccounts(client: MastodonClient) {
128128
try {
129129
val relationship = accounts.postMute(accountId).execute()
130130
it.onSuccess(relationship)
131-
} catch(throwable: Throwable) {
131+
} catch (throwable: Throwable) {
132132
it.onErrorIfNotDisposed(throwable)
133133
}
134134
}
@@ -139,7 +139,7 @@ class RxAccounts(client: MastodonClient) {
139139
try {
140140
val relationship = accounts.postUnmute(accountId).execute()
141141
it.onSuccess(relationship)
142-
} catch(throwable: Throwable) {
142+
} catch (throwable: Throwable) {
143143
it.onErrorIfNotDisposed(throwable)
144144
}
145145
}
@@ -150,7 +150,7 @@ class RxAccounts(client: MastodonClient) {
150150
try {
151151
val relationships = accounts.getRelationships(accountIds).execute()
152152
it.onSuccess(relationships)
153-
} catch(throwable: Throwable) {
153+
} catch (throwable: Throwable) {
154154
it.onErrorIfNotDisposed(throwable)
155155
}
156156
}
@@ -161,7 +161,7 @@ class RxAccounts(client: MastodonClient) {
161161
try {
162162
val accounts = accounts.getAccountSearch(query, limit).execute()
163163
it.onSuccess(accounts)
164-
} catch(throwable: Throwable) {
164+
} catch (throwable: Throwable) {
165165
it.onErrorIfNotDisposed(throwable)
166166
}
167167
}

mastodon4j/build.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ apply plugin: "jacoco"
44
apply plugin: 'maven'
55

66
group = "com.sys1yagi"
7-
version = '1.5.0'
7+
version = '1.6.0'
88

99
jacoco {
10-
toolVersion = "0.7.9"
10+
toolVersion = "0.8.2"
1111
}
1212
jacocoTestReport {
1313
reports {
@@ -35,9 +35,6 @@ dependencies {
3535
testCompile 'org.mockito:mockito-core:2.7.22'
3636
}
3737

38-
sourceCompatibility = "1.7"
39-
targetCompatibility = "1.7"
40-
4138
buildscript {
4239
repositories {
4340
mavenCentral()

wercker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ build:
55
- script:
66
name: mastodon4j test
77
code: |
8-
./gradlew mastodon4j:test mastodon4j:jacoco
8+
./gradlew mastodon4j:test mastodon4j:jacocoTestReport
99
cp -r ./mastodon4j/build/reports/jacoco/* $WERCKER_REPORT_ARTIFACTS_DIR/
1010
- script:
1111
name: mastodon4j-rx test
1212
code: |
13-
./gradlew mastodon4j-rx:test mastodon4j:jacoco
13+
./gradlew mastodon4j-rx:test
1414
- script:
1515
name: upload test result to codecov
1616
code: |

0 commit comments

Comments
 (0)