Skip to content

Commit c11eab5

Browse files
committed
Update dependencies
1 parent fd6dac5 commit c11eab5

47 files changed

Lines changed: 463 additions & 195 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

gradle/versions.gradle

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@ ext {
22
version = "5.1.1"
33
group = "com.github.proxer"
44

5-
gradleVersion = "6.6"
5+
gradleVersion = "6.7.1"
66

7-
kotlinVersion = "1.3.72"
8-
dokkaVersion = "0.9.18"
7+
kotlinVersion = "1.4.21"
8+
dokkaVersion = "1.4.20"
99

10-
jacocoVersion = "0.8.5"
11-
ktlintVersion = "9.2.1"
12-
detektVersion = "1.10.0"
10+
jacocoVersion = "0.8.6"
11+
ktlintVersion = "9.4.1"
12+
detektVersion = "1.15.0"
1313

14-
gradleVersionsPluginVersion = "0.28.0"
14+
gradleVersionsPluginVersion = "0.36.0"
1515
buildConfigPluginVersion = "1.1.8"
1616

1717
retrofitVersion = "2.9.0"
18-
okHttpVersion = "4.8.1"
19-
okioVersion = "2.6.0"
20-
moshiVersion = "1.9.3"
18+
okHttpVersion = "4.9.0"
19+
okioVersion = "2.9.0"
20+
moshiVersion = "1.11.0"
2121
moshiLazyAdaptersVersion = "2.2"
2222

23-
junitVersion = "5.6.1"
23+
junitVersion = "5.7.0"
2424
concurrentUnitVersion = "0.4.6"
25-
kluentVersion = "1.61"
26-
mockkVersion = "1.10.0"
25+
kluentVersion = "1.64"
26+
mockkVersion = "1.10.3"
2727
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

library/build.gradle

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,25 @@ plugins {
1818

1919
apply from: "${rootDir}/gradle/dependencies.gradle"
2020

21-
task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
22-
outputFormat = "html"
23-
outputDirectory = javadoc.destinationDir
24-
enabled = JavaVersion.current().isJava8()
25-
26-
includeNonPublic = false
27-
jdkVersion = 8
28-
29-
externalDocumentationLink { url = new URL("https://square.github.io/retrofit/2.x/retrofit/") }
30-
externalDocumentationLink { url = new URL("https://square.github.io/okhttp/3.x/okhttp/") }
31-
externalDocumentationLink { url = new URL("https://square.github.io/moshi/1.x/moshi/") }
21+
tasks.withType(org.jetbrains.dokka.gradle.DokkaTask).configureEach {
22+
dokkaSourceSets {
23+
configureEach {
24+
sourceLink {
25+
localDirectory.set(file("src/main/kotlin"))
26+
remoteUrl.set(uri("https://github.com/proxer/ProxerLibJava/tree/master/library/src/main/kotlin").toURL())
27+
}
3228

33-
packageOptions {
34-
prefix = "com.github.proxer.library.enums"
35-
reportUndocumented = false
29+
externalDocumentationLink { url.set(new URL("https://square.github.io/retrofit/2.x/retrofit/")) }
30+
externalDocumentationLink { url.set(new URL("https://square.github.io/okhttp/3.x/okhttp/")) }
31+
externalDocumentationLink { url.set(new URL("https://square.github.io/moshi/1.x/moshi/")) }
32+
}
3633
}
3734
}
3835

36+
tasks.dokkaJavadoc.configure {
37+
outputDirectory.set(javadoc.destinationDir)
38+
}
39+
3940
task sourceJar(type: Jar) {
4041
archiveClassifier = "sources"
4142

@@ -56,6 +57,12 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
5657
}
5758
}
5859

60+
tasks.named("dependencyUpdates").configure {
61+
rejectVersionIf {
62+
!(it.candidate.version ==~ /^[0-9,.v-]+(-r)?$/)
63+
}
64+
}
65+
5966
kapt {
6067
useBuildCache = true
6168
}
@@ -84,6 +91,7 @@ jacocoTestReport {
8491

8592
ktlint {
8693
disabledRules = ["import-ordering"]
94+
8795
reporters {
8896
reporter "checkstyle"
8997
}

library/src/main/kotlin/me/proxer/library/ProxerCall.kt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,23 @@ class ProxerCall<T> internal constructor(private val internalCall: Call<ProxerRe
7272
*/
7373
@JvmOverloads
7474
fun enqueue(callback: ((T?) -> Unit)? = null, errorCallback: ((ProxerException) -> Unit)? = null) {
75-
internalCall.enqueue(object : Callback<ProxerResponse<T>> {
76-
override fun onResponse(call: Call<ProxerResponse<T>>, response: Response<ProxerResponse<T>>) {
77-
try {
78-
callback?.invoke(processResponse(response))
79-
} catch (error: ProxerException) {
80-
errorCallback?.invoke(error)
75+
internalCall.enqueue(
76+
object : Callback<ProxerResponse<T>> {
77+
override fun onResponse(call: Call<ProxerResponse<T>>, response: Response<ProxerResponse<T>>) {
78+
try {
79+
callback?.invoke(processResponse(response))
80+
} catch (error: ProxerException) {
81+
errorCallback?.invoke(error)
82+
}
8183
}
82-
}
8384

84-
override fun onFailure(call: Call<ProxerResponse<T>>, error: Throwable) {
85-
if (error is Exception && errorCallback != null) {
86-
errorCallback.invoke(processNonProxerError(error))
85+
override fun onFailure(call: Call<ProxerResponse<T>>, error: Throwable) {
86+
if (error is Exception && errorCallback != null) {
87+
errorCallback.invoke(processNonProxerError(error))
88+
}
8789
}
8890
}
89-
})
91+
)
9092
}
9193

9294
/**

library/src/main/kotlin/me/proxer/library/api/list/TranslatorGroupProjectListEndpoint.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ class TranslatorGroupProjectListEndpoint internal constructor(
3636

3737
override fun build(): ProxerCall<List<TranslatorGroupProject>> {
3838
return internalApi.translatorGroupProjectList(
39-
id, projectState, includeHentai, page, limit
39+
id,
40+
projectState,
41+
includeHentai,
42+
page,
43+
limit
4044
)
4145
}
4246
}

library/src/main/kotlin/me/proxer/library/api/user/UserCommentsEndpoint.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@ class UserCommentsEndpoint internal constructor(
6565
val joinedHasContent = hasContent?.joinToString(DELIMITER) { ProxerUtils.getSafeApiEnumName(it) }
6666

6767
return internalApi.comments(
68-
userId, username, category, page, limit, minimumLength, joinedStates, joinedHasContent
68+
userId,
69+
username,
70+
category,
71+
page,
72+
limit,
73+
minimumLength,
74+
joinedStates,
75+
joinedHasContent
6976
)
7077
}
7178
}

library/src/main/kotlin/me/proxer/library/internal/adapter/ConferenceInfoAdapter.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ internal class ConferenceInfoAdapter {
1717
@FromJson
1818
fun fromJson(json: IntermediateConferenceInfoContainer): ConferenceInfo {
1919
return ConferenceInfo(
20-
json.info.topic, json.info.participantAmount, json.info.firstMessageTime,
21-
json.info.lastMessageTime, json.info.leaderId, json.participants
20+
json.info.topic,
21+
json.info.participantAmount,
22+
json.info.firstMessageTime,
23+
json.info.lastMessageTime,
24+
json.info.leaderId,
25+
json.participants
2226
)
2327
}
2428

library/src/main/kotlin/me/proxer/library/internal/adapter/EpisodeInfoAdapter.kt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ internal class EpisodeInfoAdapter {
3737
}
3838

3939
return EpisodeInfo(
40-
json.firstEpisode, json.lastEpisode, json.category, json.availableLanguages,
41-
json.userProgress, episodes
40+
json.firstEpisode,
41+
json.lastEpisode,
42+
json.category,
43+
json.availableLanguages,
44+
json.userProgress,
45+
episodes
4246
)
4347
}
4448

@@ -60,8 +64,12 @@ internal class EpisodeInfoAdapter {
6064
}
6165

6266
return IntermediateEpisodeInfo(
63-
value.firstEpisode, value.lastEpisode, value.category, value.availableLanguages,
64-
value.userProgress, episodes
67+
value.firstEpisode,
68+
value.lastEpisode,
69+
value.category,
70+
value.availableLanguages,
71+
value.userProgress,
72+
episodes
6573
)
6674
}
6775

library/src/main/kotlin/me/proxer/library/internal/adapter/NotificationAdapter.kt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,26 @@ internal class NotificationAdapter {
2525
.build()
2626

2727
return Notification(
28-
json.id, json.type, json.contentId, properContentLink, json.text, json.date, json.additionalDescription
28+
json.id,
29+
json.type,
30+
json.contentId,
31+
properContentLink,
32+
json.text,
33+
json.date,
34+
json.additionalDescription
2935
)
3036
}
3137

3238
@ToJson
3339
fun toJson(value: Notification): IntermediateNotification {
3440
return IntermediateNotification(
35-
value.id, value.type, value.contentId, value.contentLink.toString(),
36-
value.text, value.date, value.additionalDescription
41+
value.id,
42+
value.type,
43+
value.contentId,
44+
value.contentLink.toString(),
45+
value.text,
46+
value.date,
47+
value.additionalDescription
3748
)
3849
}
3950

library/src/main/kotlin/me/proxer/library/internal/adapter/NotificationInfoAdapter.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ internal class NotificationInfoAdapter {
2626
}
2727

2828
return NotificationInfo(
29-
json[MESSAGE_FIELD_LOCATION], json[FRIEND_REQUEST_FIELD_LOCATION],
30-
json[NEWS_FIELD_LOCATION], json[NOTIFICATIONS_FIELD_LOCATION]
29+
json[MESSAGE_FIELD_LOCATION],
30+
json[FRIEND_REQUEST_FIELD_LOCATION],
31+
json[NEWS_FIELD_LOCATION],
32+
json[NOTIFICATIONS_FIELD_LOCATION]
3133
)
3234
}
3335

0 commit comments

Comments
 (0)