2022-09-09 16:09:54 +00:00
|
|
|
import com.lagradost.cloudstream3.gradle.CloudstreamExtension
|
2022-08-31 04:26:39 +00:00
|
|
|
import com.android.build.gradle.BaseExtension
|
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
google()
|
|
|
|
mavenCentral()
|
|
|
|
// Shitpack repo which contains our tools and dependencies
|
|
|
|
maven("https://jitpack.io")
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath("com.android.tools.build:gradle:7.0.4")
|
|
|
|
// Cloudstream gradle plugin which makes everything work and builds plugins
|
2023-11-15 04:22:14 +00:00
|
|
|
classpath("com.github.recloudstream:gradle:-SNAPSHOT")
|
2023-12-29 08:58:10 +00:00
|
|
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22")
|
2022-08-31 04:26:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
google()
|
|
|
|
mavenCentral()
|
|
|
|
maven("https://jitpack.io")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-11 13:00:33 +00:00
|
|
|
fun Project.cloudstream(configuration: CloudstreamExtension.() -> Unit) = extensions.getByName<CloudstreamExtension>("cloudstream").configuration()
|
2022-08-31 04:26:39 +00:00
|
|
|
|
2022-09-11 13:00:33 +00:00
|
|
|
fun Project.android(configuration: BaseExtension.() -> Unit) = extensions.getByName<BaseExtension>("android").configuration()
|
2022-08-31 04:26:39 +00:00
|
|
|
|
|
|
|
subprojects {
|
|
|
|
apply(plugin = "com.android.library")
|
|
|
|
apply(plugin = "kotlin-android")
|
|
|
|
apply(plugin = "com.lagradost.cloudstream3.gradle")
|
|
|
|
|
|
|
|
cloudstream {
|
|
|
|
// when running through github workflow, GITHUB_REPOSITORY should contain current repository name
|
2022-09-11 13:00:33 +00:00
|
|
|
setRepo(System.getenv("GITHUB_REPOSITORY") ?: "https://github.com/hexated/cloudstream-extensions-hexated")
|
|
|
|
|
|
|
|
authors = listOf("Hexated")
|
2022-08-31 04:26:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
defaultConfig {
|
|
|
|
minSdk = 21
|
2023-11-22 10:25:08 +00:00
|
|
|
compileSdkVersion(33)
|
2022-12-23 12:02:01 +00:00
|
|
|
targetSdk = 33
|
2022-08-31 04:26:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8" // Required
|
|
|
|
// Disables some unnecessary features
|
|
|
|
freeCompilerArgs = freeCompilerArgs +
|
|
|
|
"-Xno-call-assertions" +
|
|
|
|
"-Xno-param-assertions" +
|
|
|
|
"-Xno-receiver-assertions"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
val apk by configurations
|
|
|
|
val implementation by configurations
|
|
|
|
|
|
|
|
// Stubs for all Cloudstream classes
|
|
|
|
apk("com.lagradost:cloudstream3:pre-release")
|
|
|
|
|
|
|
|
// these dependencies can include any of those which are added by the app,
|
|
|
|
// but you dont need to include any of them if you dont need them
|
|
|
|
// https://github.com/recloudstream/cloudstream/blob/master/app/build.gradle
|
2023-11-22 10:25:08 +00:00
|
|
|
|
2022-08-31 04:26:39 +00:00
|
|
|
implementation(kotlin("stdlib")) // adds standard kotlin features, like listOf, mapOf etc
|
2024-02-24 20:37:00 +00:00
|
|
|
implementation("com.github.Blatzar:NiceHttp:0.4.11") // http library
|
2024-01-14 12:18:13 +00:00
|
|
|
implementation("org.jsoup:jsoup:1.17.2") // html parser
|
|
|
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.16.1")
|
2022-09-11 13:00:33 +00:00
|
|
|
implementation("io.karn:khttp-android:0.1.2")
|
2024-02-24 20:37:00 +00:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0")
|
2023-11-22 10:25:08 +00:00
|
|
|
implementation("org.mozilla:rhino:1.7.14") //run JS
|
2022-11-02 06:56:24 +00:00
|
|
|
|
2022-08-31 04:26:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task<Delete>("clean") {
|
|
|
|
delete(rootProject.buildDir)
|
2023-10-15 20:06:39 +00:00
|
|
|
}
|