Skip to content

Commit

Permalink
Add GReader client stub
Browse files Browse the repository at this point in the history
  • Loading branch information
jocmp committed Oct 20, 2024
1 parent e04edb9 commit 0f5276e
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions googlereaderclient/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
23 changes: 23 additions & 0 deletions googlereaderclient/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
plugins {
id("java-library")
id("org.jetbrains.kotlin.jvm")
id("com.google.devtools.ksp") version libs.versions.ksp
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

dependencies {
implementation(libs.kotlinx.coroutines.core)
implementation(libs.moshi)
implementation(libs.moshi.converter)
implementation(libs.retrofit2.retrofit)
implementation(libs.retrofit2.retrofit)
ksp(libs.moshi.kotlin.codegen)
testImplementation(kotlin("test"))
testImplementation(libs.tests.junit)
testImplementation(libs.tests.kotlinx.coroutines)
testImplementation(libs.tests.mockk.mockk)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.jocmp.googlereaderclient

import com.squareup.moshi.Moshi
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.moshi.MoshiConverterFactory
import retrofit2.create

interface GoogleReader {

companion object {
fun create(
client: OkHttpClient,
baseURL: String
): GoogleReader {
val moshi = Moshi.Builder().build()

return Retrofit.Builder()
.client(client)
.baseUrl(baseURL)
.addConverterFactory(MoshiConverterFactory.create(moshi))
.build()
.create()
}
}
}
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ include(":feedbinclient")
include(":feedfinder")
include(":capy")
include(":rssparser")
include(":googlereaderclient")

0 comments on commit 0f5276e

Please sign in to comment.