mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-08 19:08:46 +01:00
chore: update to Kotlin 2.0.0 and Compose Multiplatform 1.6.10 (#892)
This commit is contained in:
parent
25a03cde65
commit
c85de822da
2
.github/workflows/android.yml
vendored
2
.github/workflows/android.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 11
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,6 +10,7 @@ local.properties
|
||||
xcuserdata
|
||||
Pods/
|
||||
release/
|
||||
.kotlin/
|
||||
|
||||
androidApp/google-services.json
|
||||
iosApp/GoogleService-Info.plist
|
||||
|
@ -1,8 +1,8 @@
|
||||
<div align="center">
|
||||
<img src="https://img.shields.io/badge/Kotlin-1.9.23-7F52FF?logo=kotlin" />
|
||||
<img src="https://img.shields.io/badge/Kotlin-2.0.0-7F52FF?logo=kotlin" />
|
||||
<img src="https://img.shields.io/badge/Gradle-8.6-02303A?logo=gradle" />
|
||||
<img src="https://img.shields.io/badge/Android-26+-34A853?logo=android" />
|
||||
<img src="https://img.shields.io/badge/Jetpack_Compose-1.6.4-4285F4?logo=jetpackcompose" />
|
||||
<img src="https://img.shields.io/badge/Jetpack_Compose-1.6.7-4285F4?logo=jetpackcompose" />
|
||||
<img src="https://img.shields.io/github/license/diegoberaldin/RaccoonForLemmy" />
|
||||
<img src="https://github.com/diegoberaldin/RaccoonForLemmy/actions/workflows/android.yml/badge.svg" />
|
||||
</div>
|
||||
|
@ -1,9 +1,8 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.archivesName
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@ -16,15 +15,12 @@ android {
|
||||
targetSdk = libs.versions.android.targetSdk.get().toInt()
|
||||
versionCode = 101
|
||||
versionName = "1.11.0-20240520-pre"
|
||||
archivesName.set("RaccoonForLemmy")
|
||||
}
|
||||
base.archivesName = "RaccoonForLemmy"
|
||||
buildFeatures {
|
||||
compose = true
|
||||
buildConfig = true
|
||||
}
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
|
||||
}
|
||||
packaging {
|
||||
resources {
|
||||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||
|
@ -2,7 +2,8 @@ plugins {
|
||||
// trick: for the same plugin versions in all sub-modules
|
||||
alias(libs.plugins.android.application).apply(false)
|
||||
alias(libs.plugins.android.library).apply(false)
|
||||
alias(libs.plugins.compose).apply(false)
|
||||
alias(libs.plugins.jetbrains.compose).apply(false)
|
||||
alias(libs.plugins.compose.compiler).apply(false)
|
||||
alias(libs.plugins.detekt).apply(false)
|
||||
alias(libs.plugins.kotlin.android).apply(false)
|
||||
alias(libs.plugins.kotlin.multiplatform).apply(false)
|
||||
|
@ -1,3 +1,5 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
@ -10,12 +12,9 @@ plugins {
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
@ -33,7 +32,7 @@ kotlin {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(libs.koin.core)
|
||||
api(libs.ktorfit.lib)
|
||||
implementation(libs.ktorfit.lib)
|
||||
implementation(libs.ktor.serialization)
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
implementation(libs.ktor.contentnegotiation)
|
||||
|
@ -2,7 +2,6 @@ package com.github.diegoberaldin.raccoonforlemmy.core.api.service
|
||||
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.LoginForm
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.LoginResponse
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
import de.jensklingenberg.ktorfit.http.Body
|
||||
import de.jensklingenberg.ktorfit.http.Headers
|
||||
import de.jensklingenberg.ktorfit.http.POST
|
||||
@ -12,5 +11,5 @@ interface AuthService {
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun login(
|
||||
@Body form: LoginForm,
|
||||
): Response<LoginResponse>
|
||||
): LoginResponse
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.RemoveCommentForm
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.ResolveCommentReportForm
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SaveCommentForm
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SuccessResponse
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
import de.jensklingenberg.ktorfit.http.Body
|
||||
import de.jensklingenberg.ktorfit.http.GET
|
||||
import de.jensklingenberg.ktorfit.http.Header
|
||||
@ -49,77 +48,77 @@ interface CommentService {
|
||||
@Query("saved_only") savedOnly: Boolean? = null,
|
||||
@Query("liked_only") likedOnly: Boolean? = null,
|
||||
@Query("disliked_only") dislikedOnly: Boolean? = null,
|
||||
): Response<GetCommentsResponse>
|
||||
): GetCommentsResponse
|
||||
|
||||
@GET("comment")
|
||||
suspend fun getBy(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Query("id") id: CommentId,
|
||||
@Query("auth") auth: String? = null,
|
||||
): Response<GetCommentResponse>
|
||||
): GetCommentResponse
|
||||
|
||||
@PUT("comment/save")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun save(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: SaveCommentForm,
|
||||
): Response<CommentResponse>
|
||||
): CommentResponse
|
||||
|
||||
@POST("comment/like")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun like(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: CreateCommentLikeForm,
|
||||
): Response<CommentResponse>
|
||||
): CommentResponse
|
||||
|
||||
@POST("comment")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun create(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: CreateCommentForm,
|
||||
): Response<CommentResponse>
|
||||
): CommentResponse
|
||||
|
||||
@PUT("comment")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun edit(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: EditCommentForm,
|
||||
): Response<CommentResponse>
|
||||
): CommentResponse
|
||||
|
||||
@POST("comment/mark_as_read")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun markAsRead(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: MarkCommentAsReadForm,
|
||||
): Response<CommentReplyResponse>
|
||||
): CommentReplyResponse
|
||||
|
||||
@POST("comment/delete")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun delete(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: DeleteCommentForm,
|
||||
): Response<CommentResponse>
|
||||
): CommentResponse
|
||||
|
||||
@POST("comment/report")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun createReport(
|
||||
@Body form: CreateCommentReportForm,
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
): Response<CommentReportResponse>
|
||||
): CommentReportResponse
|
||||
|
||||
@POST("comment/remove")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun remove(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: RemoveCommentForm,
|
||||
): Response<CommentResponse>
|
||||
): CommentResponse
|
||||
|
||||
@POST("comment/distinguish")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun distinguish(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: DistinguishCommentForm,
|
||||
): Response<CommentResponse>
|
||||
): CommentResponse
|
||||
|
||||
@GET("comment/report/list")
|
||||
@Headers("Content-Type: application/json")
|
||||
@ -130,19 +129,19 @@ interface CommentService {
|
||||
@Query("page") page: Int? = null,
|
||||
@Query("unresolved_only") unresolvedOnly: Boolean? = null,
|
||||
@Query("community_id") communityId: CommunityId? = null,
|
||||
): Response<ListCommentReportsResponse>
|
||||
): ListCommentReportsResponse
|
||||
|
||||
@PUT("comment/report/resolve")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun resolveReport(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: ResolveCommentReportForm,
|
||||
): Response<CommentReportResponse>
|
||||
): CommentReportResponse
|
||||
|
||||
@POST("admin/purge/comment")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun purge(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: PurgeCommentForm,
|
||||
): Response<SuccessResponse>
|
||||
): SuccessResponse
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.ListCommunitiesResp
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.PurgeCommunityForm
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SortType
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SuccessResponse
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
import de.jensklingenberg.ktorfit.http.Body
|
||||
import de.jensklingenberg.ktorfit.http.GET
|
||||
import de.jensklingenberg.ktorfit.http.Header
|
||||
@ -32,7 +31,7 @@ interface CommunityService {
|
||||
@Query("auth") auth: String? = null,
|
||||
@Query("id") id: CommunityId? = null,
|
||||
@Query("name") name: String? = null,
|
||||
): Response<GetCommunityResponse>
|
||||
): GetCommunityResponse
|
||||
|
||||
@GET("community/list")
|
||||
suspend fun getAll(
|
||||
@ -42,54 +41,54 @@ interface CommunityService {
|
||||
@Query("limit") limit: Int? = null,
|
||||
@Query("show_nsfw") showNsfw: Boolean = true,
|
||||
@Query("sort") sort: SortType = SortType.Active,
|
||||
): Response<ListCommunitiesResponse>
|
||||
): ListCommunitiesResponse
|
||||
|
||||
@POST("community/follow")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun follow(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: FollowCommunityForm,
|
||||
): Response<CommunityResponse>
|
||||
): CommunityResponse
|
||||
|
||||
@POST("community/block")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun block(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: BlockCommunityForm,
|
||||
): Response<BlockCommunityResponse>
|
||||
): BlockCommunityResponse
|
||||
|
||||
@POST("community/ban_user")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun ban(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: BanFromCommunityForm,
|
||||
): Response<BanFromCommunityResponse>
|
||||
): BanFromCommunityResponse
|
||||
|
||||
@POST("community/mod")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun addMod(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: AddModToCommunityForm,
|
||||
): Response<AddModToCommunityResponse>
|
||||
): AddModToCommunityResponse
|
||||
|
||||
@PUT("community")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun edit(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: EditCommunityForm,
|
||||
): Response<CommunityResponse>
|
||||
): CommunityResponse
|
||||
|
||||
@PUT("community/hide")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun hide(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: HideCommunityForm,
|
||||
): Response<SuccessResponse>
|
||||
): SuccessResponse
|
||||
|
||||
@POST("admin/purge/community")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun purge(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: PurgeCommunityForm,
|
||||
): Response<SuccessResponse>
|
||||
): SuccessResponse
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.CommunityId
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.GetModlogResponse
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.ModlogActionType
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.PersonId
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
import de.jensklingenberg.ktorfit.http.GET
|
||||
import de.jensklingenberg.ktorfit.http.Header
|
||||
import de.jensklingenberg.ktorfit.http.Query
|
||||
@ -20,5 +19,5 @@ interface ModlogService {
|
||||
@Query("mod_person_id") modId: PersonId? = null,
|
||||
@Query("other_person_id") otherId: PersonId? = null,
|
||||
@Query("type_") type: ModlogActionType? = null,
|
||||
): Response<GetModlogResponse>
|
||||
): GetModlogResponse
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.ResolvePostReportFo
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SavePostForm
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SortType
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SuccessResponse
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
import de.jensklingenberg.ktorfit.http.Body
|
||||
import de.jensklingenberg.ktorfit.http.GET
|
||||
import de.jensklingenberg.ktorfit.http.Header
|
||||
@ -51,7 +50,7 @@ interface PostService {
|
||||
@Query("saved_only") savedOnly: Boolean? = null,
|
||||
@Query("liked_only") likedOnly: Boolean? = null,
|
||||
@Query("disliked_only") dislikedOnly: Boolean? = null,
|
||||
): Response<GetPostsResponse>
|
||||
): GetPostsResponse
|
||||
|
||||
@GET("post")
|
||||
suspend fun get(
|
||||
@ -59,56 +58,56 @@ interface PostService {
|
||||
@Query("auth") auth: String? = null,
|
||||
@Query("id") id: PostId? = null,
|
||||
@Query("comment_id") commentId: CommentId? = null,
|
||||
): Response<GetPostResponse>
|
||||
): GetPostResponse
|
||||
|
||||
@GET("post/site_metadata")
|
||||
suspend fun getSiteMetadata(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Query("url")
|
||||
url: String,
|
||||
): Response<GetSiteMetadataResponse>
|
||||
): GetSiteMetadataResponse
|
||||
|
||||
@PUT("post/save")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun save(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: SavePostForm,
|
||||
): Response<PostResponse>
|
||||
): PostResponse
|
||||
|
||||
@POST("post/like")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun like(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: CreatePostLikeForm,
|
||||
): Response<PostResponse>
|
||||
): PostResponse
|
||||
|
||||
@POST("post")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun create(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: CreatePostForm,
|
||||
): Response<PostResponse>
|
||||
): PostResponse
|
||||
|
||||
@PUT("post")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun edit(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: EditPostForm,
|
||||
): Response<PostResponse>
|
||||
): PostResponse
|
||||
|
||||
@POST("post/mark_as_read")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun markAsRead(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: MarkPostAsReadForm,
|
||||
): Response<PostResponse>
|
||||
): PostResponse
|
||||
|
||||
@POST("post/delete")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun delete(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: DeletePostForm,
|
||||
): Response<PostResponse>
|
||||
): PostResponse
|
||||
|
||||
@POST
|
||||
suspend fun uploadImage(
|
||||
@ -116,35 +115,35 @@ interface PostService {
|
||||
@Header("Cookie") token: String,
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body content: MultiPartFormDataContent,
|
||||
): Response<PictrsImages>
|
||||
): PictrsImages
|
||||
|
||||
@POST("post/report")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun createReport(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: CreatePostReportForm,
|
||||
): Response<PostReportResponse>
|
||||
): PostReportResponse
|
||||
|
||||
@POST("post/feature")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun feature(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: FeaturePostForm,
|
||||
): Response<PostResponse>
|
||||
): PostResponse
|
||||
|
||||
@POST("post/remove")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun remove(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: RemovePostForm,
|
||||
): Response<PostResponse>
|
||||
): PostResponse
|
||||
|
||||
@POST("post/lock")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun lock(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: LockPostForm,
|
||||
): Response<PostResponse>
|
||||
): PostResponse
|
||||
|
||||
@GET("post/report/list")
|
||||
@Headers("Content-Type: application/json")
|
||||
@ -155,19 +154,19 @@ interface PostService {
|
||||
@Query("page") page: Int? = null,
|
||||
@Query("unresolved_only") unresolvedOnly: Boolean? = null,
|
||||
@Query("community_id") communityId: CommunityId? = null,
|
||||
): Response<ListPostReportsResponse>
|
||||
): ListPostReportsResponse
|
||||
|
||||
@PUT("post/report/resolve")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun resolveReport(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: ResolvePostReportForm,
|
||||
): Response<PostReportResponse>
|
||||
): PostReportResponse
|
||||
|
||||
@POST("admin/purge/post")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun purge(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: PurgePostForm,
|
||||
): Response<SuccessResponse>
|
||||
): SuccessResponse
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.MarkPrivateMessageA
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.PersonId
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.PrivateMessageResponse
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.PrivateMessagesResponse
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
import de.jensklingenberg.ktorfit.http.Body
|
||||
import de.jensklingenberg.ktorfit.http.GET
|
||||
import de.jensklingenberg.ktorfit.http.Header
|
||||
@ -25,33 +24,33 @@ interface PrivateMessageService {
|
||||
@Query("creator_id") creatorId: PersonId? = null,
|
||||
@Query("limit") limit: Int? = null,
|
||||
@Query("unread_only") unreadOnly: Boolean? = null,
|
||||
): Response<PrivateMessagesResponse>
|
||||
): PrivateMessagesResponse
|
||||
|
||||
@POST("private_message")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun create(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: CreatePrivateMessageForm,
|
||||
): Response<PrivateMessageResponse>
|
||||
): PrivateMessageResponse
|
||||
|
||||
@PUT("private_message")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun edit(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: EditPrivateMessageForm,
|
||||
): Response<PrivateMessageResponse>
|
||||
): PrivateMessageResponse
|
||||
|
||||
@POST("private_message/mark_as_read")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun markAsRead(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: MarkPrivateMessageAsReadForm,
|
||||
): Response<PrivateMessageResponse>
|
||||
): PrivateMessageResponse
|
||||
|
||||
@POST("private_message/delete")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun delete(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: DeletePrivateMessageForm,
|
||||
): Response<PrivateMessageResponse>
|
||||
): PrivateMessageResponse
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.ResolveObjectRespon
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SearchResponse
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SearchType
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SortType
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
import de.jensklingenberg.ktorfit.http.GET
|
||||
import de.jensklingenberg.ktorfit.http.Header
|
||||
import de.jensklingenberg.ktorfit.http.Query
|
||||
@ -26,11 +25,11 @@ interface SearchService {
|
||||
@Query("page") page: Int? = null,
|
||||
@Query("limit") limit: Int? = null,
|
||||
@Query("auth") auth: String? = null,
|
||||
): Response<SearchResponse>
|
||||
): SearchResponse
|
||||
|
||||
@GET("resolve_object")
|
||||
suspend fun resolveObject(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Query("q") q: String,
|
||||
): Response<ResolveObjectResponse>
|
||||
): ResolveObjectResponse
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package com.github.diegoberaldin.raccoonforlemmy.core.api.service
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.BlockInstanceForm
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.BlockInstanceResponse
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.GetSiteResponse
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
import de.jensklingenberg.ktorfit.http.Body
|
||||
import de.jensklingenberg.ktorfit.http.GET
|
||||
import de.jensklingenberg.ktorfit.http.Header
|
||||
@ -16,12 +15,12 @@ interface SiteService {
|
||||
suspend fun get(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Query("auth") auth: String? = null,
|
||||
): Response<GetSiteResponse>
|
||||
): GetSiteResponse
|
||||
|
||||
@POST("site/block")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun block(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: BlockInstanceForm,
|
||||
): Response<BlockInstanceResponse>
|
||||
): BlockInstanceResponse
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.PurgePersonForm
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SaveUserSettingsForm
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SaveUserSettingsResponse
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.SuccessResponse
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
import de.jensklingenberg.ktorfit.http.Body
|
||||
import de.jensklingenberg.ktorfit.http.GET
|
||||
import de.jensklingenberg.ktorfit.http.Header
|
||||
@ -36,7 +35,7 @@ interface UserService {
|
||||
@Query("sort") sort: CommentSortType = CommentSortType.New,
|
||||
@Query("username") username: String? = null,
|
||||
@Query("saved_only") savedOnly: Boolean? = null,
|
||||
): Response<GetPersonDetailsResponse>
|
||||
): GetPersonDetailsResponse
|
||||
|
||||
@GET("user/mention")
|
||||
suspend fun getMentions(
|
||||
@ -46,7 +45,7 @@ interface UserService {
|
||||
@Query("limit") limit: Int? = null,
|
||||
@Query("sort") sort: CommentSortType = CommentSortType.New,
|
||||
@Query("unread_only") unreadOnly: Boolean? = null,
|
||||
): Response<GetPersonMentionsResponse>
|
||||
): GetPersonMentionsResponse
|
||||
|
||||
@GET("user/replies")
|
||||
suspend fun getReplies(
|
||||
@ -56,40 +55,40 @@ interface UserService {
|
||||
@Query("limit") limit: Int? = null,
|
||||
@Query("sort") sort: CommentSortType = CommentSortType.New,
|
||||
@Query("unread_only") unreadOnly: Boolean? = null,
|
||||
): Response<GetRepliesResponse>
|
||||
): GetRepliesResponse
|
||||
|
||||
@POST("user/mark_all_as_read")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun markAllAsRead(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: MarkAllAsReadForm,
|
||||
): Response<GetRepliesResponse>
|
||||
): GetRepliesResponse
|
||||
|
||||
@POST("user/mention/mark_as_read")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun markPersonMentionAsRead(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: MarkPersonMentionAsReadForm,
|
||||
): Response<PersonMentionResponse>
|
||||
): PersonMentionResponse
|
||||
|
||||
@POST("user/block")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun block(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: BlockPersonForm,
|
||||
): Response<BlockPersonResponse>
|
||||
): BlockPersonResponse
|
||||
|
||||
@PUT("user/save_user_settings")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun saveUserSettings(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: SaveUserSettingsForm,
|
||||
): Response<SaveUserSettingsResponse>
|
||||
): SaveUserSettingsResponse
|
||||
|
||||
@POST("admin/purge/person")
|
||||
@Headers("Content-Type: application/json")
|
||||
suspend fun purge(
|
||||
@Header("Authorization") authHeader: String? = null,
|
||||
@Body form: PurgePersonForm,
|
||||
): Response<SuccessResponse>
|
||||
): SuccessResponse
|
||||
}
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,10 +1,12 @@
|
||||
import io.gitlab.arturbosch.detekt.Detekt
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
@ -12,12 +14,9 @@ plugins {
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
@ -74,7 +73,7 @@ ksp {
|
||||
arg("lyricist.xml.defaultLanguageTag", "en")
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile<*>>().configureEach {
|
||||
tasks.withType<KotlinCompilationTask<*>>().configureEach {
|
||||
if (name != "kspCommonMainKotlinMetadata") {
|
||||
dependsOn("kspCommonMainKotlinMetadata")
|
||||
}
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,21 +1,22 @@
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
|
||||
listOf(
|
||||
iosX64(),
|
||||
iosArm64(),
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,10 +1,12 @@
|
||||
import io.gitlab.arturbosch.detekt.Detekt
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.sqldelight)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
alias(libs.plugins.kotlinx.serialization)
|
||||
}
|
||||
@ -12,15 +14,11 @@ plugins {
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
|
||||
listOf(
|
||||
iosX64(),
|
||||
iosArm64(),
|
||||
|
@ -1,3 +1,5 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
@ -7,12 +9,9 @@ plugins {
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
@ -37,7 +37,6 @@ kotlin {
|
||||
}
|
||||
val androidMain by getting {
|
||||
dependencies {
|
||||
dependsOn(commonMain)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
implementation(libs.androidx.activity)
|
||||
implementation(kotlin("test-junit"))
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
@ -44,7 +44,6 @@ kotlin {
|
||||
}
|
||||
val androidMain by getting {
|
||||
dependencies {
|
||||
dependsOn(commonMain)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
implementation(libs.androidx.activity)
|
||||
implementation(libs.androidx.browser)
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -5,7 +5,6 @@ import com.github.diegoberaldin.raccoonforlemmy.core.api.dto.LoginResponse
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.provider.ServiceProvider
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.api.service.AuthService
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.testutils.DispatcherTestRule
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
import io.mockk.coEvery
|
||||
import io.mockk.coVerify
|
||||
import io.mockk.every
|
||||
@ -35,12 +34,7 @@ class DefaultAuthRepositoryTest {
|
||||
fun whenLogin_thenResultIsAsExpected() =
|
||||
runTest {
|
||||
val loginData = LoginResponse(token = "", registrationCreated = false, verifyEmailSent = true)
|
||||
val fakeResponse =
|
||||
mockk<Response<LoginResponse>> {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns loginData
|
||||
}
|
||||
coEvery { authService.login(any()) } returns fakeResponse
|
||||
coEvery { authService.login(any()) } returns loginData
|
||||
val res = sut.login("username", "password")
|
||||
|
||||
assertTrue(res.isSuccess)
|
||||
|
@ -23,12 +23,7 @@ internal class DefaultAuthRepository(
|
||||
password = password,
|
||||
totp2faToken = totp2faToken,
|
||||
)
|
||||
val response = services.auth.login(data)
|
||||
if (!response.isSuccessful) {
|
||||
val error = response.errorBody().toString()
|
||||
throw Exception(error)
|
||||
}
|
||||
response.body() ?: throw Exception("No response from login endpoint")
|
||||
services.auth.login(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,23 +1,21 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,3 +1,5 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
@ -7,12 +9,9 @@ plugins {
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -66,11 +66,7 @@ class DefaultCommentRepositoryTest {
|
||||
likedOnly = any(),
|
||||
dislikedOnly = any(),
|
||||
)
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns GetCommentsResponse(comments = listOf(mockk(relaxed = true)))
|
||||
}
|
||||
} returns GetCommentsResponse(comments = listOf(mockk(relaxed = true)))
|
||||
val token = "fake-token"
|
||||
val res =
|
||||
sut.getAll(
|
||||
@ -107,16 +103,12 @@ class DefaultCommentRepositoryTest {
|
||||
val token = "fake-token"
|
||||
val commentId = 1L
|
||||
coEvery { commentService.getBy(any(), any(), any()) } returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
GetCommentResponse(
|
||||
commentView =
|
||||
mockk(relaxed = true) {
|
||||
every { comment } returns mockk(relaxed = true) { every { id } returns commentId }
|
||||
},
|
||||
)
|
||||
}
|
||||
GetCommentResponse(
|
||||
commentView =
|
||||
mockk(relaxed = true) {
|
||||
every { comment } returns mockk(relaxed = true) { every { id } returns commentId }
|
||||
},
|
||||
)
|
||||
|
||||
val res = sut.getBy(id = commentId, auth = token)
|
||||
|
||||
@ -152,11 +144,7 @@ class DefaultCommentRepositoryTest {
|
||||
likedOnly = any(),
|
||||
dislikedOnly = any(),
|
||||
)
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns GetCommentsResponse(comments = listOf(mockk(relaxed = true)))
|
||||
}
|
||||
} returns GetCommentsResponse(comments = listOf(mockk(relaxed = true)))
|
||||
val token = "fake-token"
|
||||
val res =
|
||||
sut.getChildren(
|
||||
@ -237,14 +225,10 @@ class DefaultCommentRepositoryTest {
|
||||
any(),
|
||||
)
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
CommentResponse(
|
||||
commentView = mockk(relaxed = true),
|
||||
recipientIds = listOf(),
|
||||
)
|
||||
}
|
||||
CommentResponse(
|
||||
commentView = mockk(relaxed = true),
|
||||
recipientIds = listOf(),
|
||||
)
|
||||
|
||||
val res = sut.upVote(comment, token, true)
|
||||
|
||||
@ -314,14 +298,10 @@ class DefaultCommentRepositoryTest {
|
||||
any(),
|
||||
)
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
CommentResponse(
|
||||
commentView = mockk(relaxed = true),
|
||||
recipientIds = listOf(),
|
||||
)
|
||||
}
|
||||
CommentResponse(
|
||||
commentView = mockk(relaxed = true),
|
||||
recipientIds = listOf(),
|
||||
)
|
||||
|
||||
val res = sut.downVote(comment, token, true)
|
||||
|
||||
|
@ -71,20 +71,16 @@ class DefaultCommunityRepositoryTest {
|
||||
limit = any(),
|
||||
)
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
SearchResponse(
|
||||
type = SearchType.Communities,
|
||||
comments = emptyList(),
|
||||
posts = emptyList(),
|
||||
communities =
|
||||
listOf(
|
||||
mockk(relaxed = true),
|
||||
),
|
||||
users = emptyList(),
|
||||
)
|
||||
}
|
||||
SearchResponse(
|
||||
type = SearchType.Communities,
|
||||
comments = emptyList(),
|
||||
posts = emptyList(),
|
||||
communities =
|
||||
listOf(
|
||||
mockk(relaxed = true),
|
||||
),
|
||||
users = emptyList(),
|
||||
)
|
||||
|
||||
val token = "fake-token"
|
||||
val query = "q"
|
||||
@ -132,14 +128,10 @@ class DefaultCommunityRepositoryTest {
|
||||
)
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
mockk {
|
||||
every { communities } returns
|
||||
listOf(
|
||||
mockk(relaxed = true),
|
||||
)
|
||||
}
|
||||
every { communities } returns
|
||||
listOf(
|
||||
mockk(relaxed = true),
|
||||
)
|
||||
}
|
||||
|
||||
val otherInstance = "other-instance"
|
||||
@ -177,11 +169,7 @@ class DefaultCommunityRepositoryTest {
|
||||
)
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
mockk {
|
||||
every { community } returns mockk(relaxed = true)
|
||||
}
|
||||
every { community } returns mockk(relaxed = true)
|
||||
}
|
||||
|
||||
val token = "fake-token"
|
||||
@ -211,18 +199,14 @@ class DefaultCommunityRepositoryTest {
|
||||
)
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
every { myUser } returns
|
||||
mockk {
|
||||
every { myUser } returns
|
||||
mockk {
|
||||
every { follows } returns
|
||||
listOf(
|
||||
mockk {
|
||||
every { community } returns mockk(relaxed = true)
|
||||
},
|
||||
)
|
||||
}
|
||||
every { follows } returns
|
||||
listOf(
|
||||
mockk {
|
||||
every { community } returns mockk(relaxed = true)
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -254,15 +238,11 @@ class DefaultCommunityRepositoryTest {
|
||||
)
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
mockk {
|
||||
every { communityView } returns
|
||||
every { communityView } returns
|
||||
mockk(relaxed = true) {
|
||||
every { community } returns
|
||||
mockk(relaxed = true) {
|
||||
every { community } returns
|
||||
mockk(relaxed = true) {
|
||||
every { id } returns communityId
|
||||
}
|
||||
every { id } returns communityId
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -299,16 +279,12 @@ class DefaultCommunityRepositoryTest {
|
||||
)
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
mockk {
|
||||
every { communityView } returns
|
||||
every { communityView } returns
|
||||
mockk(relaxed = true) {
|
||||
every { community } returns
|
||||
mockk(relaxed = true) {
|
||||
every { community } returns
|
||||
mockk(relaxed = true) {
|
||||
every { id } returns communityId
|
||||
every { moderators } returns listOf(mockk(relaxed = true))
|
||||
}
|
||||
every { id } returns communityId
|
||||
every { moderators } returns listOf(mockk(relaxed = true))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -339,15 +315,11 @@ class DefaultCommunityRepositoryTest {
|
||||
communityService.follow(any(), any())
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
mockk {
|
||||
every { communityView } returns
|
||||
every { communityView } returns
|
||||
mockk(relaxed = true) {
|
||||
every { community } returns
|
||||
mockk(relaxed = true) {
|
||||
every { community } returns
|
||||
mockk(relaxed = true) {
|
||||
every { id } returns communityId
|
||||
}
|
||||
every { id } returns communityId
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -380,15 +352,11 @@ class DefaultCommunityRepositoryTest {
|
||||
communityService.follow(any(), any())
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns
|
||||
mockk {
|
||||
every { communityView } returns
|
||||
every { communityView } returns
|
||||
mockk(relaxed = true) {
|
||||
every { community } returns
|
||||
mockk(relaxed = true) {
|
||||
every { community } returns
|
||||
mockk(relaxed = true) {
|
||||
every { id } returns communityId
|
||||
}
|
||||
every { id } returns communityId
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -419,11 +387,7 @@ class DefaultCommunityRepositoryTest {
|
||||
val communityId = 1L
|
||||
coEvery {
|
||||
communityService.block(any(), any())
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns mockk()
|
||||
}
|
||||
} returns mockk()
|
||||
val token = "fake-token"
|
||||
|
||||
sut.block(
|
||||
@ -450,11 +414,7 @@ class DefaultCommunityRepositoryTest {
|
||||
val userId = 2L
|
||||
coEvery {
|
||||
communityService.ban(any(), any())
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns mockk()
|
||||
}
|
||||
} returns mockk()
|
||||
|
||||
val token = "fake-token"
|
||||
sut.banUser(
|
||||
@ -483,11 +443,7 @@ class DefaultCommunityRepositoryTest {
|
||||
val userId = 2L
|
||||
coEvery {
|
||||
communityService.addMod(any(), any())
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns mockk()
|
||||
}
|
||||
} returns mockk()
|
||||
|
||||
val token = "fake-token"
|
||||
sut.addModerator(
|
||||
@ -515,11 +471,7 @@ class DefaultCommunityRepositoryTest {
|
||||
val communityId = 1L
|
||||
coEvery {
|
||||
communityService.edit(any(), any())
|
||||
} returns
|
||||
mockk {
|
||||
every { isSuccessful } returns true
|
||||
every { body() } returns mockk()
|
||||
}
|
||||
} returns mockk()
|
||||
|
||||
val token = "fake-token"
|
||||
val newName = "fake-community-name"
|
||||
|
@ -6,7 +6,6 @@ import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.CommentReportM
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.ListingType
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.PersonMentionModel
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.SortType
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
|
||||
interface CommentRepository {
|
||||
companion object {
|
||||
@ -55,7 +54,7 @@ interface CommentRepository {
|
||||
comment: CommentModel,
|
||||
auth: String,
|
||||
voted: Boolean,
|
||||
): Result<Response<CommentResponse>>
|
||||
): Result<CommentResponse>
|
||||
|
||||
fun asDownVoted(
|
||||
comment: CommentModel,
|
||||
@ -71,7 +70,7 @@ interface CommentRepository {
|
||||
comment: CommentModel,
|
||||
auth: String,
|
||||
downVoted: Boolean,
|
||||
): Result<Response<CommentResponse>>
|
||||
): Result<CommentResponse>
|
||||
|
||||
fun asSaved(
|
||||
comment: CommentModel,
|
||||
@ -82,7 +81,7 @@ interface CommentRepository {
|
||||
comment: CommentModel,
|
||||
auth: String,
|
||||
saved: Boolean,
|
||||
): Result<Response<CommentResponse>>
|
||||
): Result<CommentResponse>
|
||||
|
||||
suspend fun create(
|
||||
postId: Long,
|
||||
|
@ -63,8 +63,7 @@ internal class DefaultCommentRepository(
|
||||
maxDepth = maxDepth,
|
||||
)
|
||||
}
|
||||
val dto = response.body()?.comments ?: emptyList()
|
||||
dto.map { it.toModel() }
|
||||
response.comments.map { it.toModel() }
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -80,11 +79,11 @@ internal class DefaultCommentRepository(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
id = id,
|
||||
auth = auth,
|
||||
).body()
|
||||
)
|
||||
} else {
|
||||
customServices.changeInstance(instance)
|
||||
customServices.comment.getBy(id = id).body()
|
||||
}?.commentView?.toModel()
|
||||
customServices.comment.getBy(id = id)
|
||||
}.commentView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -120,8 +119,7 @@ internal class DefaultCommentRepository(
|
||||
maxDepth = maxDepth,
|
||||
)
|
||||
}
|
||||
val dto = response.body()?.comments ?: emptyList()
|
||||
dto.map { it.toModel() }
|
||||
response.comments.map { it.toModel() }
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -367,7 +365,7 @@ internal class DefaultCommentRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
response.body()?.commentView?.toModel()
|
||||
response.commentView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -389,7 +387,7 @@ internal class DefaultCommentRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
response.body()?.commentView?.toModel()
|
||||
response.commentView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -411,7 +409,7 @@ internal class DefaultCommentRepository(
|
||||
limit = limit,
|
||||
unresolvedOnly = unresolvedOnly,
|
||||
)
|
||||
response.body()?.commentReports?.map {
|
||||
response.commentReports.map {
|
||||
it.toModel()
|
||||
}
|
||||
}.getOrNull()
|
||||
@ -435,7 +433,7 @@ internal class DefaultCommentRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
response.body()?.commentReportView?.toModel()
|
||||
response.commentReportView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -449,11 +447,11 @@ internal class DefaultCommentRepository(
|
||||
commentId = commentId,
|
||||
reason = reason,
|
||||
)
|
||||
val response =
|
||||
val res =
|
||||
services.comment.purge(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
require(response.body()?.success == true)
|
||||
require(res.success)
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ internal class DefaultCommunityRepository(
|
||||
type = resultType.toDto(),
|
||||
listingType = listingType.toDto(),
|
||||
sort = sortType.toDto(),
|
||||
).body()
|
||||
)
|
||||
} else {
|
||||
customServices.changeInstance(instance)
|
||||
customServices.search.search(
|
||||
@ -63,19 +63,19 @@ internal class DefaultCommunityRepository(
|
||||
type = resultType.toDto(),
|
||||
listingType = listingType.toDto(),
|
||||
sort = sortType.toDto(),
|
||||
).body()
|
||||
)
|
||||
}
|
||||
buildList<SearchResult> {
|
||||
val posts = searchResponse?.posts?.map { it.toModel() }.orEmpty()
|
||||
val posts = searchResponse.posts.map { it.toModel() }
|
||||
this += posts.map { SearchResult.Post(it) }
|
||||
|
||||
val comments = searchResponse?.comments?.map { it.toModel() }.orEmpty()
|
||||
val comments = searchResponse.comments.map { it.toModel() }
|
||||
this += comments.map { SearchResult.Comment(it) }
|
||||
|
||||
val communities = searchResponse?.communities?.map { it.toModel() }.orEmpty()
|
||||
val communities = searchResponse.communities.map { it.toModel() }
|
||||
this += communities.map { SearchResult.Community(it) }
|
||||
|
||||
val users = searchResponse?.users?.map { it.toModel() }.orEmpty()
|
||||
val users = searchResponse.users.map { it.toModel() }
|
||||
this += users.map { SearchResult.User(it) }
|
||||
}
|
||||
}.getOrElse { emptyList() }
|
||||
@ -95,10 +95,10 @@ internal class DefaultCommunityRepository(
|
||||
page = page,
|
||||
limit = limit,
|
||||
sort = sortType.toDto(),
|
||||
).body()
|
||||
response?.communities?.map {
|
||||
)
|
||||
response.communities.map {
|
||||
it.toModel()
|
||||
}.orEmpty()
|
||||
}
|
||||
}.getOrElse { emptyList() }
|
||||
}
|
||||
|
||||
@ -112,8 +112,8 @@ internal class DefaultCommunityRepository(
|
||||
services.search.resolveObject(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
q = query,
|
||||
).body()
|
||||
resolveResponse?.community?.toModel()
|
||||
)
|
||||
resolveResponse.community?.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -124,8 +124,8 @@ internal class DefaultCommunityRepository(
|
||||
services.site.get(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
auth = auth,
|
||||
).body()
|
||||
response?.myUser?.follows?.map { it.community.toModel() }.orEmpty()
|
||||
)
|
||||
response.myUser?.follows?.map { it.community.toModel() }.orEmpty()
|
||||
}.getOrElse { emptyList() }
|
||||
}
|
||||
|
||||
@ -144,12 +144,12 @@ internal class DefaultCommunityRepository(
|
||||
auth = auth,
|
||||
id = id,
|
||||
name = name,
|
||||
).body()
|
||||
)
|
||||
} else {
|
||||
customServices.changeInstance(instance)
|
||||
customServices.community.get(name = name).body()
|
||||
customServices.community.get(name = name)
|
||||
}
|
||||
response?.communityView?.toModel()
|
||||
response.communityView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -164,10 +164,10 @@ internal class DefaultCommunityRepository(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
auth = auth,
|
||||
id = id,
|
||||
).body()
|
||||
response?.moderators?.map {
|
||||
)
|
||||
response.moderators.map {
|
||||
it.moderator.toModel()
|
||||
}.orEmpty()
|
||||
}
|
||||
}.getOrElse { emptyList() }
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ internal class DefaultCommunityRepository(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = data,
|
||||
)
|
||||
response.body()?.communityView?.toModel()
|
||||
response.communityView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ internal class DefaultCommunityRepository(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = data,
|
||||
)
|
||||
response.body()?.communityView?.toModel()
|
||||
response.communityView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -257,7 +257,7 @@ internal class DefaultCommunityRepository(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = data,
|
||||
)
|
||||
response.body()?.personView?.toModel()?.copy(banned = ban)
|
||||
response.personView.toModel().copy(banned = ban)
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -280,8 +280,8 @@ internal class DefaultCommunityRepository(
|
||||
services.community.addMod(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = data,
|
||||
).body()
|
||||
response?.moderators?.map {
|
||||
)
|
||||
response.moderators?.map {
|
||||
it.moderator.toModel()
|
||||
}.orEmpty()
|
||||
}.getOrElse { emptyList() }
|
||||
@ -302,15 +302,10 @@ internal class DefaultCommunityRepository(
|
||||
nsfw = community.nsfw,
|
||||
postingRestrictedToMods = community.postingRestrictedToMods,
|
||||
)
|
||||
val response =
|
||||
services.community.edit(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = data,
|
||||
)
|
||||
if (!response.isSuccessful) {
|
||||
val error = response.errorBody().toString()
|
||||
throw Exception(error)
|
||||
}
|
||||
services.community.edit(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = data,
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun hide(
|
||||
@ -330,7 +325,7 @@ internal class DefaultCommunityRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
require(response.body()?.success == true)
|
||||
require(response.success)
|
||||
}
|
||||
|
||||
override suspend fun purge(
|
||||
@ -348,6 +343,6 @@ internal class DefaultCommunityRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
require(response.body()?.success == true)
|
||||
require(response.success)
|
||||
}
|
||||
}
|
||||
|
@ -30,24 +30,23 @@ internal class DefaultModlogRepository(
|
||||
page = page,
|
||||
type = type.toDto(),
|
||||
)
|
||||
val dto = response.body() ?: return@runCatching null
|
||||
val result =
|
||||
buildList<ModlogItem> {
|
||||
this += dto.added?.map { it.toDto() }.orEmpty()
|
||||
this += dto.addedToCommunity?.map { it.toDto() }.orEmpty()
|
||||
this += dto.adminPurgedComments?.map { it.toDto() }.orEmpty()
|
||||
this += dto.adminPurgedCommunities?.map { it.toDto() }.orEmpty()
|
||||
this += dto.adminPurgedPersons?.map { it.toDto() }.orEmpty()
|
||||
this += dto.adminPurgedPosts?.map { it.toDto() }.orEmpty()
|
||||
this += dto.banned?.map { it.toDto() }.orEmpty()
|
||||
this += dto.bannedFromCommunity?.map { it.toDto() }.orEmpty()
|
||||
this += dto.featuredPosts?.map { it.toDto() }.orEmpty()
|
||||
this += dto.hiddenCommunities?.map { it.toDto() }.orEmpty()
|
||||
this += dto.lockedPosts?.map { it.toDto() }.orEmpty()
|
||||
this += dto.removedComments?.map { it.toDto() }.orEmpty()
|
||||
this += dto.removedCommunities?.map { it.toDto() }.orEmpty()
|
||||
this += dto.removedPosts?.map { it.toDto() }.orEmpty()
|
||||
this += dto.transferredToCommunity?.map { it.toDto() }.orEmpty()
|
||||
this += response.added?.map { it.toDto() }.orEmpty()
|
||||
this += response.addedToCommunity?.map { it.toDto() }.orEmpty()
|
||||
this += response.adminPurgedComments?.map { it.toDto() }.orEmpty()
|
||||
this += response.adminPurgedCommunities?.map { it.toDto() }.orEmpty()
|
||||
this += response.adminPurgedPersons?.map { it.toDto() }.orEmpty()
|
||||
this += response.adminPurgedPosts?.map { it.toDto() }.orEmpty()
|
||||
this += response.banned?.map { it.toDto() }.orEmpty()
|
||||
this += response.bannedFromCommunity?.map { it.toDto() }.orEmpty()
|
||||
this += response.featuredPosts?.map { it.toDto() }.orEmpty()
|
||||
this += response.hiddenCommunities?.map { it.toDto() }.orEmpty()
|
||||
this += response.lockedPosts?.map { it.toDto() }.orEmpty()
|
||||
this += response.removedComments?.map { it.toDto() }.orEmpty()
|
||||
this += response.removedCommunities?.map { it.toDto() }.orEmpty()
|
||||
this += response.removedPosts?.map { it.toDto() }.orEmpty()
|
||||
this += response.transferredToCommunity?.map { it.toDto() }.orEmpty()
|
||||
}
|
||||
result.sortedByDescending { it.date }
|
||||
}.getOrNull()
|
||||
|
@ -21,8 +21,7 @@ import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.SortType
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.repository.utils.toAuthHeader
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.repository.utils.toDto
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.repository.utils.toModel
|
||||
import io.ktor.client.request.forms.MultiPartFormDataContent
|
||||
import io.ktor.client.request.forms.formData
|
||||
import io.ktor.client.request.forms.*
|
||||
import io.ktor.http.Headers
|
||||
import io.ktor.http.HttpHeaders
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@ -69,9 +68,8 @@ internal class DefaultPostRepository(
|
||||
sort = sort.toDto(),
|
||||
)
|
||||
}
|
||||
val body = response.body()
|
||||
val posts = body?.posts?.map { it.toModel() } ?: emptyList()
|
||||
posts to body?.nextPage
|
||||
val posts = response.posts.map { it.toModel() }
|
||||
posts to response.nextPage
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -88,13 +86,12 @@ internal class DefaultPostRepository(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
auth = auth,
|
||||
id = id,
|
||||
).body()
|
||||
)
|
||||
} else {
|
||||
customServices.changeInstance(instance)
|
||||
customServices.post.get(id = id).body()
|
||||
customServices.post.get(id = id)
|
||||
}
|
||||
val dto = response?.postView
|
||||
dto?.toModel()?.copy(
|
||||
response.postView.toModel().copy(
|
||||
crossPosts = response.crossPosts.map { it.toModel() },
|
||||
)
|
||||
}.getOrNull()
|
||||
@ -330,8 +327,8 @@ internal class DefaultPostRepository(
|
||||
token = "jwt=$auth",
|
||||
authHeader = auth.toAuthHeader(),
|
||||
content = multipart,
|
||||
).body()
|
||||
"$url/${images?.files?.firstOrNull()?.file}"
|
||||
)
|
||||
"$url/${images.files?.firstOrNull()?.file}"
|
||||
}.apply {
|
||||
exceptionOrNull()?.also {
|
||||
it.printStackTrace()
|
||||
@ -378,7 +375,7 @@ internal class DefaultPostRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
response.body()?.postView?.toModel()
|
||||
response.postView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -400,7 +397,7 @@ internal class DefaultPostRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
response.body()?.postView?.toModel()
|
||||
response.postView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -423,7 +420,7 @@ internal class DefaultPostRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
response.body()?.postView?.toModel()
|
||||
response.postView.toModel()
|
||||
}.getOrNull()
|
||||
|
||||
override suspend fun getReports(
|
||||
@ -444,7 +441,7 @@ internal class DefaultPostRepository(
|
||||
limit = limit,
|
||||
unresolvedOnly = unresolvedOnly,
|
||||
)
|
||||
response.body()?.postReports?.map {
|
||||
response.postReports.map {
|
||||
it.toModel()
|
||||
}
|
||||
}.getOrNull()
|
||||
@ -468,7 +465,7 @@ internal class DefaultPostRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
response.body()?.postReportView?.toModel()
|
||||
response.postReportView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -487,6 +484,6 @@ internal class DefaultPostRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
require(response.body()?.success == true)
|
||||
require(response.success)
|
||||
}
|
||||
}
|
||||
|
@ -33,8 +33,7 @@ internal class DefaultPrivateMessageRepository(
|
||||
page = page,
|
||||
unreadOnly = unreadOnly,
|
||||
)
|
||||
val dto = response.body() ?: return@runCatching emptyList()
|
||||
dto.privateMessages.map { it.toModel() }
|
||||
response.privateMessages.map { it.toModel() }
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -51,12 +50,12 @@ internal class DefaultPrivateMessageRepository(
|
||||
auth = auth.orEmpty(),
|
||||
recipientId = recipientId,
|
||||
)
|
||||
val dto =
|
||||
val response =
|
||||
services.privateMessages.create(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = data,
|
||||
).body()
|
||||
dto?.privateMessageView?.toModel()
|
||||
)
|
||||
response.privateMessageView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -72,12 +71,12 @@ internal class DefaultPrivateMessageRepository(
|
||||
auth = auth.orEmpty(),
|
||||
privateMessageId = messageId,
|
||||
)
|
||||
val dto =
|
||||
val response =
|
||||
services.privateMessages.edit(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = data,
|
||||
).body()
|
||||
dto?.privateMessageView?.toModel()
|
||||
)
|
||||
response.privateMessageView.toModel()
|
||||
}.getOrNull()
|
||||
|
||||
override suspend fun markAsRead(
|
||||
@ -93,12 +92,12 @@ internal class DefaultPrivateMessageRepository(
|
||||
auth = auth.orEmpty(),
|
||||
read = read,
|
||||
)
|
||||
val dto =
|
||||
val response =
|
||||
services.privateMessages.markAsRead(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = data,
|
||||
)
|
||||
dto.body()?.privateMessageView?.toModel()
|
||||
response.privateMessageView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
|
@ -21,12 +21,12 @@ internal class DefaultSiteRepository(
|
||||
override suspend fun getCurrentUser(auth: String): UserModel? =
|
||||
withContext(Dispatchers.IO) {
|
||||
runCatching {
|
||||
val dto =
|
||||
val response =
|
||||
services.site.get(
|
||||
auth = auth,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
).body()
|
||||
dto?.myUser?.let {
|
||||
)
|
||||
response.myUser?.let {
|
||||
val user = it.localUserView?.person
|
||||
val counts = it.localUserView?.counts
|
||||
user?.toModel()?.copy(score = counts?.toModel())
|
||||
@ -41,18 +41,18 @@ internal class DefaultSiteRepository(
|
||||
withContext(Dispatchers.IO) {
|
||||
runCatching {
|
||||
if (otherInstance.isNullOrEmpty()) {
|
||||
val dto =
|
||||
val response =
|
||||
services.site.get(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
).body()
|
||||
dto?.version.takeIf { !it.isNullOrEmpty() }
|
||||
)
|
||||
response.version.takeIf { !it.isNullOrEmpty() }
|
||||
} else {
|
||||
customServices.changeInstance(otherInstance)
|
||||
val dto =
|
||||
val response =
|
||||
customServices.site.get(
|
||||
authHeader = "",
|
||||
).body()
|
||||
dto?.version.takeIf { !it.isNullOrEmpty() }
|
||||
)
|
||||
response.version.takeIf { !it.isNullOrEmpty() }
|
||||
}
|
||||
}.getOrNull()
|
||||
}
|
||||
@ -79,7 +79,7 @@ internal class DefaultSiteRepository(
|
||||
withContext(Dispatchers.IO) {
|
||||
runCatching {
|
||||
val response = services.post.getSiteMetadata(url = url)
|
||||
response.body()?.metadata?.toModel()
|
||||
response.metadata.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -87,8 +87,7 @@ internal class DefaultSiteRepository(
|
||||
withContext(Dispatchers.IO) {
|
||||
runCatching {
|
||||
val response = services.site.get(auth = auth)
|
||||
val dto = response.body()
|
||||
dto?.allLanguages?.map { it.toModel() }.orEmpty()
|
||||
response.allLanguages.map { it.toModel() }
|
||||
}.getOrElse { emptyList() }
|
||||
}
|
||||
|
||||
@ -99,20 +98,19 @@ internal class DefaultSiteRepository(
|
||||
return@runCatching true
|
||||
}
|
||||
val response = services.site.get(auth = auth)
|
||||
val dto = response.body()
|
||||
dto?.siteView?.localSite?.enableDownvotes == true
|
||||
response.siteView?.localSite?.enableDownvotes == true
|
||||
}.getOrElse { true }
|
||||
}
|
||||
|
||||
override suspend fun getAccountSettings(auth: String): AccountSettingsModel? =
|
||||
withContext(Dispatchers.IO) {
|
||||
runCatching {
|
||||
val dto =
|
||||
val response =
|
||||
services.site.get(
|
||||
auth = auth,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
).body()
|
||||
dto?.myUser?.localUserView?.run {
|
||||
)
|
||||
response.myUser?.localUserView?.run {
|
||||
localUser?.toModel()?.copy(
|
||||
avatar = person.avatar,
|
||||
banner = person.banner,
|
||||
@ -131,26 +129,21 @@ internal class DefaultSiteRepository(
|
||||
): Unit =
|
||||
withContext(Dispatchers.IO) {
|
||||
val formData = value.toDto().copy(auth = auth)
|
||||
val response =
|
||||
services.user.saveUserSettings(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = formData,
|
||||
)
|
||||
if (!response.isSuccessful) {
|
||||
val error = response.errorBody().toString()
|
||||
throw Exception(error)
|
||||
}
|
||||
services.user.saveUserSettings(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
form = formData,
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun getBans(auth: String): AccountBansModel? =
|
||||
withContext(Dispatchers.IO) {
|
||||
runCatching {
|
||||
val dto =
|
||||
val response =
|
||||
services.site.get(
|
||||
auth = auth,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
).body()
|
||||
dto?.myUser?.run {
|
||||
)
|
||||
response.myUser?.run {
|
||||
AccountBansModel(
|
||||
users = personBlocks.map { it.target.toModel() },
|
||||
communities = communityBlocks.map { it.community.toModel() },
|
||||
|
@ -35,8 +35,8 @@ internal class DefaultUserRepository(
|
||||
services.search.resolveObject(
|
||||
authHeader = auth,
|
||||
q = query,
|
||||
).body()
|
||||
response?.user?.toModel()
|
||||
)
|
||||
response.user?.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -61,8 +61,7 @@ internal class DefaultUserRepository(
|
||||
username = "$username@$otherInstance",
|
||||
)
|
||||
}
|
||||
val dto = response.body() ?: return@runCatching null
|
||||
dto.personView.toModel()
|
||||
response.personView.toModel()
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -96,8 +95,7 @@ internal class DefaultUserRepository(
|
||||
sort = sort.toCommentDto(),
|
||||
)
|
||||
}
|
||||
val dto = response.body() ?: return@runCatching emptyList()
|
||||
dto.posts.map { it.toModel() }
|
||||
response.posts.map { it.toModel() }
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -120,8 +118,7 @@ internal class DefaultUserRepository(
|
||||
sort = sort.toCommentDto(),
|
||||
savedOnly = true,
|
||||
)
|
||||
val dto = response.body() ?: return@runCatching emptyList()
|
||||
dto.posts.map { it.toModel() }
|
||||
response.posts.map { it.toModel() }
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -155,8 +152,7 @@ internal class DefaultUserRepository(
|
||||
sort = sort.toCommentDto(),
|
||||
)
|
||||
}
|
||||
val dto = response.body() ?: return@runCatching emptyList()
|
||||
dto.comments.map { it.toModel() }
|
||||
response.comments.map { it.toModel() }
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -179,8 +175,7 @@ internal class DefaultUserRepository(
|
||||
sort = sort.toCommentDto(),
|
||||
savedOnly = true,
|
||||
)
|
||||
val dto = response.body() ?: return@runCatching emptyList()
|
||||
dto.comments.map { it.toModel() }
|
||||
response.comments.map { it.toModel() }
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -202,8 +197,7 @@ internal class DefaultUserRepository(
|
||||
page = page,
|
||||
unreadOnly = unreadOnly,
|
||||
)
|
||||
val dto = response.body() ?: return@runCatching emptyList()
|
||||
dto.mentions.map { it.toModel() }
|
||||
response.mentions.map { it.toModel() }
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -225,8 +219,7 @@ internal class DefaultUserRepository(
|
||||
page = page,
|
||||
unreadOnly = unreadOnly,
|
||||
)
|
||||
val dto = response.body() ?: return@runCatching emptyList()
|
||||
dto.replies.map { it.toModel() }
|
||||
response.replies.map { it.toModel() }
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -311,10 +304,10 @@ internal class DefaultUserRepository(
|
||||
authHeader = auth.toAuthHeader(),
|
||||
auth = auth,
|
||||
personId = id,
|
||||
).body()
|
||||
response?.moderates?.map {
|
||||
)
|
||||
response.moderates.map {
|
||||
it.community.toModel()
|
||||
}.orEmpty()
|
||||
}
|
||||
}.getOrElse { emptyList() }
|
||||
}
|
||||
|
||||
@ -340,9 +333,8 @@ internal class DefaultUserRepository(
|
||||
likedOnly = if (liked) true else null,
|
||||
dislikedOnly = if (!liked) true else null,
|
||||
)
|
||||
val body = response.body()
|
||||
val posts = body?.posts?.map { it.toModel() } ?: emptyList()
|
||||
posts to body?.nextPage
|
||||
val posts = response.posts.map { it.toModel() }
|
||||
posts to response.nextPage
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@ -365,8 +357,8 @@ internal class DefaultUserRepository(
|
||||
type = ListingType.All,
|
||||
likedOnly = if (liked) true else null,
|
||||
dislikedOnly = if (!liked) true else null,
|
||||
).body()
|
||||
response?.comments?.map { it.toModel() }
|
||||
)
|
||||
response.comments.map { it.toModel() }
|
||||
}.getOrElse { emptyList() }
|
||||
}
|
||||
|
||||
@ -385,6 +377,6 @@ internal class DefaultUserRepository(
|
||||
form = data,
|
||||
authHeader = auth.toAuthHeader(),
|
||||
)
|
||||
require(response.body()?.success == true)
|
||||
require(response.success)
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.ListingType
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.PostModel
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.PostReportModel
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.SortType
|
||||
import de.jensklingenberg.ktorfit.Response
|
||||
|
||||
interface PostRepository {
|
||||
companion object {
|
||||
@ -39,7 +38,7 @@ interface PostRepository {
|
||||
post: PostModel,
|
||||
auth: String,
|
||||
voted: Boolean,
|
||||
): Result<Response<PostResponse>>
|
||||
): Result<PostResponse>
|
||||
|
||||
fun asDownVoted(
|
||||
post: PostModel,
|
||||
@ -50,7 +49,7 @@ interface PostRepository {
|
||||
post: PostModel,
|
||||
auth: String,
|
||||
downVoted: Boolean,
|
||||
): Result<Response<PostResponse>>
|
||||
): Result<PostResponse>
|
||||
|
||||
fun asSaved(
|
||||
post: PostModel,
|
||||
@ -61,7 +60,7 @@ interface PostRepository {
|
||||
post: PostModel,
|
||||
auth: String,
|
||||
saved: Boolean,
|
||||
): Result<Response<PostResponse>>
|
||||
): Result<PostResponse>
|
||||
|
||||
suspend fun create(
|
||||
communityId: Long,
|
||||
@ -87,7 +86,7 @@ interface PostRepository {
|
||||
read: Boolean,
|
||||
postId: Long,
|
||||
auth: String? = null,
|
||||
): Result<Response<PostResponse>>
|
||||
): Result<PostResponse>
|
||||
|
||||
suspend fun delete(
|
||||
id: Long,
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -9,19 +9,17 @@ androidx_splashscreen = "1.0.1"
|
||||
androidx_work = "2.9.0"
|
||||
android_gradle = "8.2.2"
|
||||
coil = "2.6.0"
|
||||
compose = "1.6.2"
|
||||
compose_compiler = "1.5.11"
|
||||
compose = "1.6.10"
|
||||
detekt = "1.23.6"
|
||||
kamel = "0.9.4"
|
||||
koin = "3.5.6"
|
||||
kotlin = "1.9.23"
|
||||
kotlin = "2.0.0"
|
||||
kotlincrypto = "0.5.1"
|
||||
kotlinx_coroutines = "1.8.0"
|
||||
kotlinx_serialization_json = "1.6.3"
|
||||
ksp = "1.9.23-1.0.20"
|
||||
ksp = "2.0.0-1.0.21"
|
||||
ktor = "2.3.11"
|
||||
ktorfit_gradle = "1.12.0"
|
||||
ktorfit_lib = "1.12.0"
|
||||
ktorfit = "2.0.0-beta1"
|
||||
lyricist = "1.7.0"
|
||||
materialKolor = "1.5.1"
|
||||
mockk = "1.13.11"
|
||||
@ -71,8 +69,8 @@ ktor_android = { module = "io.ktor:ktor-client-android", version.ref = "ktor" }
|
||||
ktor_contentnegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
|
||||
ktor_logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" }
|
||||
ktor_json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
|
||||
ktorfit_ksp = { module = "de.jensklingenberg.ktorfit:ktorfit-ksp", version.ref = "ktorfit.gradle" }
|
||||
ktorfit_lib = { module = "de.jensklingenberg.ktorfit:ktorfit-lib", version.ref = "ktorfit.lib" }
|
||||
ktorfit_ksp = { module = "de.jensklingenberg.ktorfit:ktorfit-ksp", version.ref = "ktorfit" }
|
||||
ktorfit_lib = { module = "de.jensklingenberg.ktorfit:ktorfit-lib", version.ref = "ktorfit" }
|
||||
|
||||
materialKolor = { module = "com.materialkolor:material-kolor", version.ref = "materialKolor" }
|
||||
|
||||
@ -109,11 +107,12 @@ core = { group = "androidx.core", name = "core", version.ref = "androidx.core" }
|
||||
|
||||
android_application = { id = "com.android.application", version.ref = "android.gradle" }
|
||||
android_library = { id = "com.android.library", version.ref = "android.gradle" }
|
||||
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
|
||||
jetbrains_compose = { id = "org.jetbrains.compose", version.ref = "compose" }
|
||||
compose_compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
|
||||
kotlin_android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
kotlin_multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
||||
kotlinx_serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
ktorfit = { id = "de.jensklingenberg.ktorfit", version.ref = "ktorfit.gradle" }
|
||||
ktorfit = { id = "de.jensklingenberg.ktorfit", version.ref = "ktorfit" }
|
||||
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
|
||||
|
@ -1,21 +1,22 @@
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
|
||||
listOf(
|
||||
iosX64(),
|
||||
iosArm64(),
|
||||
@ -105,28 +106,15 @@ kotlin {
|
||||
implementation(kotlin("test"))
|
||||
}
|
||||
}
|
||||
val androidMain by getting {
|
||||
dependsOn(commonMain)
|
||||
}
|
||||
val androidUnitTest by getting
|
||||
val iosX64Main by getting
|
||||
val iosArm64Main by getting
|
||||
val iosSimulatorArm64Main by getting
|
||||
val iosMain by getting {
|
||||
dependsOn(commonMain)
|
||||
iosX64Main.dependsOn(this)
|
||||
iosArm64Main.dependsOn(this)
|
||||
iosSimulatorArm64Main.dependsOn(this)
|
||||
}
|
||||
val iosMain by getting
|
||||
val iosX64Test by getting
|
||||
val iosArm64Test by getting
|
||||
val iosSimulatorArm64Test by getting
|
||||
val iosTest by getting {
|
||||
dependsOn(commonTest)
|
||||
iosX64Test.dependsOn(this)
|
||||
iosArm64Test.dependsOn(this)
|
||||
iosSimulatorArm64Test.dependsOn(this)
|
||||
}
|
||||
val iosTest by getting
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -615,15 +615,6 @@ class PostDetailScreen(
|
||||
)
|
||||
}
|
||||
|
||||
OptionId.Report -> {
|
||||
val screen =
|
||||
ModerateWithReasonScreen(
|
||||
actionId = ModerateWithReasonAction.ReportPost.toInt(),
|
||||
contentId = uiState.post.id,
|
||||
)
|
||||
navigationCoordinator.pushScreen(screen)
|
||||
}
|
||||
|
||||
OptionId.Purge -> {
|
||||
val screen =
|
||||
ModerateWithReasonScreen(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
@ -1,19 +1,19 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
||||
kotlin {
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
Loading…
x
Reference in New Issue
Block a user