Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade gradle and cleanup #21

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
- name: Clean old builds
run: rm $GITHUB_WORKSPACE/builds/*.cs3 || true

- name: Setup JDK 11
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Setup Android SDK
uses: android-actions/setup-android@v2
Expand Down
11 changes: 4 additions & 7 deletions DailymotionProvider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// use an integer for version numbers
// Use an integer for version numbers
version = 1

cloudstream {
// All of these properties are optional, you can safely remove them
// All of these properties are optional, you can safely remove them.

description = "Watch content from Dailymotion"
authors = listOf("Luna712")
Expand All @@ -13,12 +13,9 @@ cloudstream {
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
**/
status = 1 // Will be 3 if unspecified

// List of video source types. Users are able to filter for extensions in a given category.
// You can find a list of available types here:
// https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html
tvTypes = listOf("Others")
iconUrl = "https://www.google.com/s2/favicons?domain=www.dailymotion.com&sz=%size%"
}
2 changes: 1 addition & 1 deletion DailymotionProvider/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.example"/>
<manifest />
11 changes: 4 additions & 7 deletions InvidiousProvider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// use an integer for version numbers
// Use an integer for version numbers
version = 6

cloudstream {
// All of these properties are optional, you can safely remove them
// All of these properties are optional, you can safely remove them.

description = "Watch content from any invidious instance"
authors = listOf("Cloudburst")
Expand All @@ -13,12 +13,9 @@ cloudstream {
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
**/
status = 1 // Will be 3 if unspecified

// List of video source types. Users are able to filter for extensions in a given category.
// You can find a list of available types here:
// https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html
tvTypes = listOf("Others")
iconUrl = "https://www.google.com/s2/favicons?domain=invidious.io&sz=%size%"
}
2 changes: 1 addition & 1 deletion InvidiousProvider/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.example"/>
<manifest />
11 changes: 4 additions & 7 deletions TwitchProvider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// use an integer for version numbers
// Use an integer for version numbers
version = 1

cloudstream {
// All of these properties are optional, you can safely remove them
// All of these properties are optional, you can safely remove them.

description = "Watch livestreams from Twitch"
authors = listOf("CranberrySoup")
Expand All @@ -13,12 +13,9 @@ cloudstream {
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
**/
status = 1 // Will be 3 if unspecified

// List of video source types. Users are able to filter for extensions in a given category.
// You can find a list of available types here:
// https://recloudstream.github.io/dokka/-cloudstream/com.lagradost.cloudstream3/-tv-type/index.html
tvTypes = listOf("Live")
iconUrl = "https://www.google.com/s2/favicons?domain=twitch.tv&sz=%size%"
}
2 changes: 1 addition & 1 deletion TwitchProvider/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.example"/>
<manifest />
54 changes: 29 additions & 25 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import com.lagradost.cloudstream3.gradle.CloudstreamExtension
import com.android.build.gradle.BaseExtension
import com.lagradost.cloudstream3.gradle.CloudstreamExtension
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

buildscript {
repositories {
Expand All @@ -10,10 +12,10 @@ buildscript {
}

dependencies {
classpath("com.android.tools.build:gradle:7.0.4")
// Cloudstream gradle plugin which makes everything work and builds plugins
classpath("com.android.tools.build:gradle:8.7.3")
// CloudStream gradle plugin which makes everything work and builds plugins
classpath("com.github.recloudstream:gradle:-SNAPSHOT")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0")
}
}

Expand Down Expand Up @@ -41,45 +43,47 @@ subprojects {
}

android {
namespace = "recloudstream"

defaultConfig {
minSdk = 21
compileSdkVersion(33)
targetSdk = 33
compileSdkVersion(35)
targetSdk = 35
}

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"
tasks.withType<KotlinJvmCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8) // Required
freeCompilerArgs.addAll(
"-Xno-call-assertions",
"-Xno-param-assertions",
"-Xno-receiver-assertions"
)
}
}
}

dependencies {
val apk by configurations
val cloudstream by configurations
val implementation by configurations

// Stubs for all Cloudstream classes
apk("com.lagradost:cloudstream3:pre-release")
// Stubs for all cloudstream classes
cloudstream("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
implementation(kotlin("stdlib")) // adds standard kotlin features, like listOf, mapOf etc
implementation("com.github.Blatzar:NiceHttp:0.4.11") // http library
implementation("org.jsoup:jsoup:1.16.2") // html parser
// These dependencies can include any of those which are added by the app,
// but you don't need to include any of them if you don't need them.
// https://github.com/recloudstream/cloudstream/blob/master/app/build.gradle.kts
implementation(kotlin("stdlib")) // Adds Standard Kotlin Features
implementation("com.github.Blatzar:NiceHttp:0.4.11") // HTTP Lib
implementation("org.jsoup:jsoup:1.18.3") // HTML Parser
}
}

task<Delete>("clean") {
delete(rootProject.buildDir)
}
delete(rootProject.layout.buildDirectory)
}
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Sun Feb 20 16:26:11 CET 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
6 changes: 3 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
rootProject.name = "CloudstreamPlugins"

// This file sets what projects are included. All new projects should get automatically included unless specified in "disabled" variable.
// This file sets what projects are included.
// All new projects should get automatically included unless specified in the "disabled" variable.

val disabled = listOf<String>()

Expand All @@ -14,6 +15,5 @@ fun File.eachDir(block: (File) -> Unit) {
listFiles()?.filter { it.isDirectory }?.forEach { block(it) }
}


// To only include a single project, comment out the previous lines (except the first one), and include your plugin like so:
// include("PluginName")
// include("PluginName")