1
- import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
- import java.net.URI
3
-
4
1
plugins {
5
- id(" com.android.library" )
6
- id(" kotlin-android" )
2
+ kotlin(" jvm" )
7
3
id(" org.jetbrains.dokka" )
8
4
}
9
5
10
- val javaTarget = JvmTarget .fromTarget(libs.versions.jvmTarget.get())
11
-
12
- android {
13
- compileSdk = libs.versions.compileSdk.get().toInt()
14
- sourceSets[" main" ].manifest.srcFile(" src/androidMain/AndroidManifest.xml" )
15
-
16
- defaultConfig {
17
- minSdk = libs.versions.minSdk.get().toInt()
18
- }
19
-
20
- namespace = " com.lagradost.api"
21
-
22
- compileOptions {
23
- sourceCompatibility = JavaVersion .toVersion(javaTarget.target)
24
- targetCompatibility = JavaVersion .toVersion(javaTarget.target)
25
- }
26
-
27
- @Suppress(" UnstableApiUsage" )
28
- testOptions {
29
- targetSdk = libs.versions.targetSdk.get().toInt()
30
- }
31
-
32
- lint {
33
- targetSdk = libs.versions.targetSdk.get().toInt()
34
- }
35
- }
36
-
37
- val dokkaImplementation: Configuration by configurations.creating {
38
- // This ensures you can access artifacts
39
- isCanBeResolved = true
40
- isTransitive = true
41
- }
42
-
43
6
dependencies {
44
- dokkaImplementation(libs.junit.ktx)
45
- dokkaImplementation(libs.core.ktx)
46
- dokkaImplementation(libs.appcompat)
47
- dokkaImplementation(libs.navigation.ui.ktx)
48
- dokkaImplementation(libs.lifecycle.livedata.ktx)
49
- dokkaImplementation(libs.lifecycle.viewmodel.ktx)
50
- dokkaImplementation(libs.navigation.fragment.ktx)
51
- dokkaImplementation(libs.preference.ktx)
52
- dokkaImplementation(libs.material)
53
- dokkaImplementation(libs.constraintlayout)
54
- dokkaImplementation(libs.swiperefreshlayout)
55
- dokkaImplementation(libs.guava)
56
- dokkaImplementation(libs.auto.service.ksp)
57
- dokkaImplementation(libs.bundles.media3)
58
- dokkaImplementation(libs.colorpicker) // Subtitle Color Picker
59
- dokkaImplementation(libs.bundles.nextlibMedia3)
60
- dokkaImplementation(libs.newpipeextractor)
61
- dokkaImplementation(libs.juniversalchardet) // Subtitle Decoding
62
- dokkaImplementation(libs.acra.core)
63
- dokkaImplementation(libs.acra.toast)
64
- dokkaImplementation(libs.shimmer) // Shimmering Effect (Loading Skeleton)
65
- dokkaImplementation(libs.palette.ktx) // Palette for Images -> Colors
66
- dokkaImplementation(libs.tvprovider)
67
- dokkaImplementation(libs.overlappingpanels) // Gestures
68
- dokkaImplementation(libs.biometric) // Fingerprint Authentication
69
- dokkaImplementation(libs.previewseekbar.media3) // SeekBar Preview
70
- dokkaImplementation(libs.qrcode.kotlin) // QR Code for PIN Auth on TV
71
- dokkaImplementation(libs.rhino) // Run JavaScript
72
- dokkaImplementation(libs.fuzzywuzzy) // Library/Ext Searching with Levenshtein Distance
73
- dokkaImplementation(libs.safefile) // To Prevent the URI File Fu*kery
74
- dokkaImplementation(libs.conscrypt.android) // To Fix SSL Fu*kery on Android 9
75
- dokkaImplementation(libs.tmdb.java) // TMDB API v3 Wrapper Made with RetroFit
76
- dokkaImplementation(libs.jackson.module.kotlin) // JSON Parser
77
- dokkaImplementation(libs.work.runtime)
78
- dokkaImplementation(libs.work.runtime.ktx)
79
- dokkaImplementation(libs.nicehttp) // HTTP Lib
7
+ dokka(project(" :app:" ))
8
+ dokka(project(" :library:" ))
80
9
}
81
10
82
11
dokka {
83
- dokkaSourceSets {
84
- moduleName = " Cloudstream"
85
- register(" cloudstream" ) {
86
- listOf (" androidMain" , " commonMain" ).forEach { srcName ->
87
- sourceRoots.from(" ../library/src/$srcName /kotlin" )
88
- }
89
- sourceRoots.from(file(" ../app/src/main/java" ))
90
-
91
- classpath.from(android.bootClasspath)
92
- classpath.from(dokkaImplementation.files)
93
-
94
- sourceLink {
95
- localDirectory = file(" .." )
96
- remoteUrl(" https://github.com/recloudstream/cloudstream/tree/master" )
97
- remoteLineSuffix = " #L"
98
- }
99
-
100
- externalDocumentationLinks {
101
- dokkaImplementation.dependencies.forEach {
102
- register(it.name) {
103
- url = URI (" https://javadoc.io/doc/${it.group} /${it.name} /${it.version} " )
104
- packageListUrl = URI (" https://javadoc.io/doc/${it.group} /${it.name} /${it.version} /package-list" )
105
- }
106
- }
107
- }
108
- }
109
- }
12
+ moduleName = " Cloudstream"
110
13
}
0 commit comments