Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
LuftVerbot committed Sep 2, 2024
2 parents 2013bd2 + c25b7f7 commit 7483db2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 29 deletions.
30 changes: 6 additions & 24 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
namespace = "dev.brahmkshatriya.echo.extension"
compileSdk = 35
defaultConfig {
applicationId = "dev.brahmkshatriya.echo.extension.deezer"
applicationId = "dev.brahmkshatriya.echo.extension.$extId"
minSdk = 24
targetSdk = 35

Expand All @@ -44,33 +44,15 @@ android {
put("class_path", "dev.brahmkshatriya.echo.extension.${extClass}")
put("version", verName)
put("version_code", verCode.toString())
extIconUrl?.let { put("icon_url", it) }
put("icon_url", extIconUrl ?: "")
put("app_name", "Echo : $extName Extension")
put("name", extName)
extDescription?.let { put("description", it) }
put("description", extDescription?:"")
put("author", extAuthor)
extAuthorUrl?.let { put("author_url", it) }
extRepoUrl?.let { put("repo_url", it) }
extUpdateUrl?.let { put("update_url", it) }
put("author_url", extAuthorUrl ?: "")
put("repo_url", extRepoUrl ?: "")
put("update_url", extUpdateUrl ?: "")
}
resValue("string", "id", extId)
resValue("string", "class_path", "$namespace.${extClass}")

versionName = verName
resValue("string", "version", verName)
versionCode = verCode
resValue("string", "version_code", verCode.toString())

extIconUrl?.let { resValue("string", "icon_url", it) }
resValue("string", "app_name", "Echo : $extName Extension")
resValue("string", "name", extName)
description?.let { resValue("string", "description", it) }

resValue("string", "author", extAuthor)
extAuthorUrl?.let { resValue("string", "author_url", it) }

extRepoUrl?.let { resValue("string", "repo_url", it) }
extUpdateUrl?.let { resValue("string", "update_url", it) }
}

buildTypes {
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.2.2" apply false
id("com.android.application") version "8.5.2" apply false
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
id("org.jetbrains.kotlin.jvm") version "1.9.22" apply false
id("org.jetbrains.kotlin.jvm") version "2.0.0" apply false
}
10 changes: 7 additions & 3 deletions ext/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import java.io.ByteArrayOutputStream
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("java-library")
Expand All @@ -12,6 +12,10 @@ java {
targetCompatibility = JavaVersion.VERSION_17
}

kotlin {
jvmToolchain(17)
}

dependencies {
val libVersion: String by project
compileOnly("com.github.brahmkshatriya:echo:$libVersion")
Expand All @@ -22,6 +26,8 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
}

// Extension properties goto `gradle.properties` to set values

val extType: String by project
val extId: String by project
val extClass: String by project
Expand All @@ -41,7 +47,6 @@ val gitCount = execute("git", "rev-list", "--count", "HEAD").toInt()
val verCode = gitCount
val verName = gitHash


tasks {
val shadowJar by getting(ShadowJar::class) {
archiveBaseName.set(extId)
Expand Down Expand Up @@ -79,4 +84,3 @@ fun execute(vararg command: String): String {
}
return outputStream.toString().trim()
}

0 comments on commit 7483db2

Please sign in to comment.