Skip to content

Commit

Permalink
upgrade moshi
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredsburrows committed Jul 30, 2024
1 parent 6cde10b commit 28f5de5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
7 changes: 1 addition & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
id 'org.jetbrains.dokka' version '1.8.10' apply false
id 'org.jlleitschuh.gradle.ktlint' version '12.1.1' apply false
id 'com.gradle.plugin-publish' version '0.21.0' apply false
id 'com.google.devtools.ksp' version '2.0.0-1.0.23' apply false
id 'java-gradle-plugin'
id 'java-library'
id 'groovy'
Expand All @@ -17,12 +18,6 @@ allprojects {
preferProjectModules()

enableDependencyVerification()

eachDependency { details ->
if (details.requested.group == "org.jetbrains.kotlin") {
details.useVersion("2.0.0")
}
}
}
}
}
Expand Down
12 changes: 10 additions & 2 deletions gradle-versions-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'org.jetbrains.dokka'
id 'org.jlleitschuh.gradle.ktlint'
id 'com.gradle.plugin-publish'
id 'com.google.devtools.ksp'
id 'maven-publish'
id 'java-gradle-plugin'
id 'java-library'
Expand All @@ -25,14 +26,21 @@ tasks.register('createClasspathManifest') {
}
}

ktlint {
ignoreFailures = true
filter {
exclude("**/build/generated/**")
}
}

dependencies {
compileOnly gradleApi()

implementation localGroovy()
implementation 'org.jetbrains.kotlin:kotlin-stdlib:2.0.0'
implementation 'org.jetbrains.kotlin:kotlin-reflect:2.0.0'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'com.squareup.moshi:moshi-kotlin:1.12.0'
implementation 'com.squareup.moshi:moshi-kotlin:1.15.1'
ksp 'com.squareup.moshi:moshi-kotlin-codegen:1.15.1'

testRuntimeOnly files(createClasspathManifest)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.github.benmanes.gradle.versions.reporter

import com.github.benmanes.gradle.versions.reporter.result.Result
import com.squareup.moshi.Moshi
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
import org.gradle.api.Project
import java.io.OutputStream

Expand Down Expand Up @@ -34,7 +33,6 @@ class JsonReporter(
companion object {
private val moshi =
Moshi.Builder()
.addLast(KotlinJsonAdapterFactory())
.build()
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.github.benmanes.gradle.versions.updates.gradle

import com.squareup.moshi.JsonClass
import com.squareup.moshi.Moshi
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
import okhttp3.OkHttpClient
import okhttp3.Request
import org.gradle.util.GradleVersion
Expand Down Expand Up @@ -94,11 +94,11 @@ class GradleUpdateChecker(
.build()
private val moshi =
Moshi.Builder()
.addLast(KotlinJsonAdapterFactory())
.build()

/** Represents the XML from [gradleVersionsApiBaseUrl] */
private class VersionSite {
@JsonClass(generateAdapter = true)
internal class VersionSite {
var version: String? = null
}

Expand Down

0 comments on commit 28f5de5

Please sign in to comment.