diff --git a/.github/workflows/generate_dokka.yml b/.github/workflows/generate_dokka.yml index 96e616447..ec50743ae 100644 --- a/.github/workflows/generate_dokka.yml +++ b/.github/workflows/generate_dokka.yml @@ -55,11 +55,11 @@ jobs: run: | cd $GITHUB_WORKSPACE/src/ chmod +x gradlew - ./gradlew app:dokkaHtml + ./gradlew docs:dokkaHtml - name: Copy Dokka run: | - cp -r $GITHUB_WORKSPACE/src/app/build/dokka/html/* $GITHUB_WORKSPACE/dokka/ + cp -r $GITHUB_WORKSPACE/src/docs/build/dokka/html/* $GITHUB_WORKSPACE/dokka/ - name: Push builds run: | diff --git a/.idea/gradle.xml b/.idea/gradle.xml index d7c08c9c2..db202a929 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -10,6 +10,7 @@ diff --git a/.idea/studiobot.xml b/.idea/studiobot.xml new file mode 100644 index 000000000..9298202cb --- /dev/null +++ b/.idea/studiobot.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9e71b0beb..e05b28e1e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,9 +1,7 @@ import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties -import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.archivesName import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import java.io.ByteArrayOutputStream -import java.net.URL plugins { id("com.android.application") @@ -152,10 +150,6 @@ android { namespace = "com.lagradost.cloudstream3" } -repositories { - maven("https://jitpack.io") -} - dependencies { // Testing testImplementation("junit:junit:4.13.2") @@ -204,7 +198,7 @@ dependencies { // PlayBack implementation("com.jaredrummler:colorpicker:1.1.0") // Subtitle Color Picker implementation("com.github.recloudstream:media-ffmpeg:1.1.0") // Custom FF-MPEG Lib for Audio Codecs - implementation("com.github.teamnewpipe:NewPipeExtractor:176da72") /* For Trailers + implementation("com.github.teamnewpipe:NewPipeExtractor:v0.24.2") /* For Trailers ^ Update to Latest Commits if Trailers Misbehave, github.com/TeamNewPipe/NewPipeExtractor/commits/dev */ implementation("com.github.albfernandez:juniversalchardet:2.5.0") // Subtitle Decoding @@ -283,22 +277,4 @@ tasks.withType { jvmTarget = "1.8" freeCompilerArgs = listOf("-Xjvm-default=all-compatibility") } -} - -tasks.withType().configureEach { - moduleName.set("Cloudstream") - dokkaSourceSets { - named("main") { - sourceLink { - // Unix based directory relative path to the root of the project (where you execute gradle respectively). - localDirectory.set(file("src/main/java")) - - // URL showing where the source code can be accessed through the web browser - remoteUrl.set(URL("https://github.com/recloudstream/cloudstream/tree/master/app/src/main/java")) - - // Suffix which is used to append the line number to the URL. Use #L for GitHub - remoteLineSuffix.set("#L") - } - } - } -} +} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 34f141b4f..16e58dc18 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,6 +17,8 @@ allprojects { repositories { google() mavenCentral() + mavenLocal() + maven("https://jitpack.io") } } @@ -26,4 +28,4 @@ plugins { //tasks.register("clean") { // delete(rootProject.layout.buildDirectory) -//} +//} \ No newline at end of file diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/docs/build.gradle.kts b/docs/build.gradle.kts new file mode 100644 index 000000000..bef026411 --- /dev/null +++ b/docs/build.gradle.kts @@ -0,0 +1,109 @@ +import org.jetbrains.dokka.gradle.DokkaTask +import java.net.URL + +plugins { + id("com.android.library") + id("kotlin-android") + id("org.jetbrains.dokka") +} + +android { + compileSdk = 34 + sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") + + defaultConfig { + minSdk = 21 + targetSdk = 33 + } + + namespace = "com.lagradost.api" + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } +} + +val dokkaImplementation by configurations.creating { + // This ensures you can access artifacts + isCanBeResolved = true + isTransitive = true +} + +dependencies { + dokkaImplementation("androidx.test.ext:junit-ktx:1.2.1") + dokkaImplementation("androidx.core:core-ktx:1.13.1") + dokkaImplementation("androidx.appcompat:appcompat:1.7.0") + dokkaImplementation("androidx.navigation:navigation-ui-ktx:2.7.7") + dokkaImplementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.3") + dokkaImplementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.3") + dokkaImplementation("androidx.navigation:navigation-fragment-ktx:2.7.7") + dokkaImplementation("jp.wasabeef:glide-transformations:4.3.0") + dokkaImplementation("androidx.preference:preference-ktx:1.2.1") + dokkaImplementation("com.google.android.material:material:1.12.0") + dokkaImplementation("androidx.constraintlayout:constraintlayout:2.1.4") + dokkaImplementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") + dokkaImplementation("com.github.bumptech.glide:glide:4.16.0") + dokkaImplementation("com.github.bumptech.glide:okhttp3-integration:4.16.0") + dokkaImplementation("com.google.guava:guava:33.2.1-android") + dokkaImplementation("dev.zacsweers.autoservice:auto-service-ksp:1.2.0") + dokkaImplementation("androidx.media3:media3-ui:1.4.0") + dokkaImplementation("androidx.media3:media3-cast:1.4.0") + dokkaImplementation("androidx.media3:media3-common:1.4.0") + dokkaImplementation("androidx.media3:media3-session:1.4.0") + dokkaImplementation("androidx.media3:media3-exoplayer:1.4.0") + dokkaImplementation("com.google.android.mediahome:video:1.0.0") + dokkaImplementation("androidx.media3:media3-exoplayer-hls:1.4.0") + dokkaImplementation("androidx.media3:media3-exoplayer-dash:1.4.0") + dokkaImplementation("androidx.media3:media3-datasource-okhttp:1.4.0") + dokkaImplementation("com.jaredrummler:colorpicker:1.1.0") // Subtitle Color Picker + dokkaImplementation("com.github.recloudstream:media-ffmpeg:1.1.0") // Custom FF-MPEG Lib for Audio Codecs + dokkaImplementation("com.github.teamnewpipe:NewPipeExtractor:v0.24.2") + dokkaImplementation("com.github.albfernandez:juniversalchardet:2.5.0") // Subtitle Decoding + dokkaImplementation("ch.acra:acra-core:5.11.3") + dokkaImplementation("ch.acra:acra-toast:5.11.3") + dokkaImplementation("com.facebook.shimmer:shimmer:0.5.0") // Shimmering Effect (Loading Skeleton) + dokkaImplementation("androidx.palette:palette-ktx:1.0.0") // Palette For Images -> Colors + dokkaImplementation("androidx.tvprovider:tvprovider:1.0.0") + dokkaImplementation("com.github.discord:OverlappingPanels:0.1.5") // Gestures + dokkaImplementation("androidx.biometric:biometric:1.2.0-alpha05") // Fingerprint Authentication + dokkaImplementation("com.github.rubensousa:previewseekbar-media3:1.1.1.0") // SeekBar Preview + dokkaImplementation("io.github.g0dkar:qrcode-kotlin:4.2.0") // QR code for PIN Auth on TV + dokkaImplementation("org.mozilla:rhino:1.7.15") // run JavaScript + dokkaImplementation("me.xdrop:fuzzywuzzy:1.4.0") // Library/Ext Searching with Levenshtein Distance + dokkaImplementation("com.github.LagradOst:SafeFile:0.0.6") // To Prevent the URI File Fu*kery + dokkaImplementation("org.conscrypt:conscrypt-android:2.5.2") // To Fix SSL Fu*kery on Android 9 + dokkaImplementation("com.uwetrottmann.tmdb2:tmdb-java:2.11.0") // TMDB API v3 Wrapper Made with RetroFit + dokkaImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1") + dokkaImplementation("androidx.work:work-runtime:2.9.0") + dokkaImplementation("androidx.work:work-runtime-ktx:2.9.0") + dokkaImplementation("com.github.Blatzar:NiceHttp:0.4.11") // HTTP Lib +} + +tasks.withType().configureEach { + dokkaSourceSets { + moduleName = "Cloudstream" + register("cloudstream") { + listOf("androidMain", "commonMain").forEach { srcName -> + sourceRoot("../library/src/$srcName/kotlin") + } + sourceRoot(file("../app/src/main/java")) + + classpath.from(android.bootClasspath) + classpath.from(dokkaImplementation.files) + + sourceLink { + localDirectory = file("..") + remoteUrl = URL("https://github.com/recloudstream/cloudstream/tree/master") + remoteLineSuffix = "#L" + } + + dokkaImplementation.dependencies.forEach { + externalDocumentationLink { + url = URL("https://javadoc.io/doc/${it.group}/${it.name}/${it.version}") + packageListUrl = URL("https://javadoc.io/doc/${it.group}/${it.name}/${it.version}/package-list") + } + } + } + } +} \ No newline at end of file diff --git a/library/.gitignore b/library/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/library/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/library/build.gradle.kts b/library/build.gradle.kts index 00bc3c147..0ffcd5f22 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -27,16 +27,11 @@ kotlin { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0") implementation("me.xdrop:fuzzywuzzy:1.4.0") // Match extractors implementation("org.mozilla:rhino:1.7.15") // run JavaScript - implementation("com.github.teamnewpipe:NewPipeExtractor:176da72") + implementation("com.github.teamnewpipe:NewPipeExtractor:v0.24.2") } } } -repositories { - mavenLocal() - maven("https://jitpack.io") -} - tasks.withType { kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString() } diff --git a/settings.gradle.kts b/settings.gradle.kts index eabd9f0ee..bd26f9f34 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,5 @@ rootProject.name = "CloudStream" include(":app") -include(":library") \ No newline at end of file +include(":library") +include(":docs") \ No newline at end of file