-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a588a2
commit 64843c6
Showing
19 changed files
with
112 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,27 @@ | ||
plugins { | ||
id("com.android.library") | ||
id("org.jetbrains.kotlin.android") | ||
id("kotlin-parcelize") | ||
id("java-library") | ||
id("org.jetbrains.kotlin.jvm") | ||
kotlin("plugin.serialization") version "2.0.10" | ||
id("maven-publish") | ||
} | ||
|
||
android { | ||
namespace = "dev.brahmkshatriya.echo.common" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
minSdk = 24 | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
java { | ||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
} | ||
|
||
android { | ||
publishing { | ||
singleVariant("release") { | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
} | ||
} | ||
dependencies { | ||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1") | ||
} | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
register<MavenPublication>("release") { | ||
from(components["release"]) | ||
} | ||
publishing { | ||
publications { | ||
create<MavenPublication>("mavenJava") { | ||
groupId = "dev.brahmkshatriya.echo" | ||
artifactId = "common" | ||
version = "1.0" | ||
|
||
from(components["java"]) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
common/src/main/java/dev/brahmkshatriya/echo/common/models/Artist.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
package dev.brahmkshatriya.echo.common.models | ||
|
||
import android.os.Parcelable | ||
import kotlinx.parcelize.Parcelize | ||
import kotlinx.serialization.Serializable | ||
import java.io.Serializable as JSerializable | ||
|
||
@Parcelize | ||
@Serializable | ||
data class Artist( | ||
override val id: String, | ||
override val name: String, | ||
override val cover: ImageHolder? = null, | ||
override val extras: Map<String, String> = mapOf(), | ||
val id: String, | ||
val name: String, | ||
val cover: ImageHolder? = null, | ||
val extras: Map<String, String> = mapOf(), | ||
val subtitle: String? = null, | ||
val description: String? = null, | ||
val followers: Int? = null, | ||
val isFollowing : Boolean = false, | ||
) : User(id, name, cover), Parcelable | ||
) : JSerializable |
7 changes: 7 additions & 0 deletions
7
common/src/main/java/dev/brahmkshatriya/echo/common/models/Bitmap.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package dev.brahmkshatriya.echo.common.models | ||
|
||
import kotlinx.serialization.Serializable | ||
import java.io.Serializable as JSerializable | ||
|
||
@Serializable | ||
class Bitmap: JSerializable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 8 additions & 10 deletions
18
common/src/main/java/dev/brahmkshatriya/echo/common/models/ImageHolder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
common/src/main/java/dev/brahmkshatriya/echo/common/models/Request.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
common/src/main/java/dev/brahmkshatriya/echo/common/models/Streamable.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package dev.brahmkshatriya.echo.common.models | ||
|
||
import android.os.Parcelable | ||
import kotlinx.parcelize.Parcelize | ||
import kotlinx.serialization.Serializable | ||
import java.io.Serializable as JSerializable | ||
|
||
@Parcelize | ||
@Serializable | ||
data class Streamable( | ||
val id: String, | ||
val quality: Int, | ||
val extra: Map<String, String> = mapOf() | ||
) : Parcelable | ||
) : JSerializable |
12 changes: 6 additions & 6 deletions
12
common/src/main/java/dev/brahmkshatriya/echo/common/models/StreamableAudio.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
common/src/main/java/dev/brahmkshatriya/echo/common/models/User.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package dev.brahmkshatriya.echo.common.models | ||
|
||
import android.os.Parcelable | ||
import kotlinx.parcelize.Parcelize | ||
import kotlinx.serialization.Serializable | ||
import java.io.Serializable as JSerializable | ||
|
||
@Parcelize | ||
@Serializable | ||
open class User( | ||
open val id: String, | ||
open val name: String, | ||
open val cover: ImageHolder? = null, | ||
open val extras: Map<String, String> = mapOf() | ||
) : Parcelable | ||
open val extras: Map<String, String> = emptyMap(), | ||
) : JSerializable |
12 changes: 6 additions & 6 deletions
12
common/src/main/java/dev/brahmkshatriya/echo/common/providers/ContextProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package dev.brahmkshatriya.echo.common.providers | ||
|
||
import android.content.Context | ||
|
||
interface ContextProvider { | ||
fun setContext(context: Context) | ||
} | ||
// | ||
//import android.content.Context | ||
// | ||
//interface ContextProvider { | ||
// fun setContext(context: Context) | ||
//} |
Oops, something went wrong.