Skip to content

Commit b3c44be

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents fd11b5d + db2ef08 commit b3c44be

File tree

5 files changed

+30
-33
lines changed

5 files changed

+30
-33
lines changed

app/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ android {
145145
lint {
146146
abortOnError = false
147147
checkReleaseBuilds = false
148-
disable.add("MissingTranslation")
149148
}
150149

151150
buildFeatures {

app/lint.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<lint>
3+
<!-- ByteOrderMark has errors in values-b+ja/strings.xml, but it's handled by weblate so we don't really care. -->
4+
<issue id="ByteOrderMark" severity="ignore" />
5+
6+
<!-- We don't care about MissingTranslation since it's handled by weblate. -->
7+
<issue id="MissingTranslation" severity="ignore" />
8+
</lint>

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
alias(libs.plugins.android.application) apply false
3-
alias(libs.plugins.android.library) apply false
3+
alias(libs.plugins.android.multiplatform.library) apply false
44
alias(libs.plugins.buildkonfig) apply false // Universal build config
55
alias(libs.plugins.dokka) apply false
66
alias(libs.plugins.kotlin.android) apply false

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "w
112112

113113
[plugins]
114114
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
115-
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
115+
android-multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "androidGradlePlugin" }
116116
buildkonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildkonfigGradlePlugin" }
117117
dokka = { id = "org.jetbrains.dokka", version.ref = "dokkaGradlePlugin" }
118118
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinGradlePlugin" }

library/build.gradle.kts

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
88
plugins {
99
id("maven-publish") // Gradle core plugin
1010
alias(libs.plugins.kotlin.multiplatform)
11-
alias(libs.plugins.android.library)
11+
alias(libs.plugins.android.multiplatform.library)
1212
alias(libs.plugins.buildkonfig)
1313
alias(libs.plugins.dokka)
1414
}
@@ -17,7 +17,23 @@ val javaTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
1717

1818
kotlin {
1919
version = "1.0.1"
20-
androidTarget()
20+
21+
android {
22+
// If this is the same com.lagradost.cloudstream3.R stops working
23+
namespace = "com.lagradost.api"
24+
25+
compileSdk = libs.versions.compileSdk.get().toInt()
26+
minSdk = libs.versions.minSdk.get().toInt()
27+
28+
compilerOptions {
29+
jvmTarget.set(javaTarget)
30+
}
31+
32+
lint {
33+
targetSdk = libs.versions.targetSdk.get().toInt()
34+
}
35+
}
36+
2137
jvm()
2238

2339
compilerOptions {
@@ -66,40 +82,14 @@ buildkonfig {
6682

6783
// Reads local.properties
6884
val localProperties = gradleLocalProperties(rootDir, project.providers)
69-
7085
buildConfigField(
7186
FieldSpec.Type.STRING,
72-
"MDL_API_KEY", (System.getenv("MDL_API_KEY") ?: localProperties["mdl.key"]).toString()
87+
"MDL_API_KEY",
88+
(System.getenv("MDL_API_KEY") ?: localProperties["mdl.key"]).toString()
7389
)
7490
}
7591
}
7692

77-
android {
78-
compileSdk = libs.versions.compileSdk.get().toInt()
79-
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
80-
81-
defaultConfig {
82-
minSdk = libs.versions.minSdk.get().toInt()
83-
}
84-
85-
// If this is the same com.lagradost.cloudstream3.R stops working
86-
namespace = "com.lagradost.api"
87-
88-
compileOptions {
89-
sourceCompatibility = JavaVersion.toVersion(javaTarget.target)
90-
targetCompatibility = JavaVersion.toVersion(javaTarget.target)
91-
}
92-
93-
@Suppress("UnstableApiUsage")
94-
testOptions {
95-
targetSdk = libs.versions.targetSdk.get().toInt()
96-
}
97-
98-
lint {
99-
targetSdk = libs.versions.targetSdk.get().toInt()
100-
}
101-
}
102-
10393
publishing {
10494
publications {
10595
withType<MavenPublication> {

0 commit comments

Comments
 (0)