Skip to content

Commit f3b21f4

Browse files
authored
Upgrade gradle and cleanup (#21)
* Upgrade gradle and cleanup * Fix namespace * Replace apk * Cleanup * Cleanup * Cleanup
1 parent bf168de commit f3b21f4

File tree

10 files changed

+55
-61
lines changed

10 files changed

+55
-61
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
- name: Clean old builds
3333
run: rm $GITHUB_WORKSPACE/builds/*.cs3 || true
3434

35-
- name: Setup JDK 11
35+
- name: Setup JDK 17
3636
uses: actions/setup-java@v1
3737
with:
38-
java-version: 11
38+
java-version: 17
3939

4040
- name: Setup Android SDK
4141
uses: android-actions/setup-android@v2
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
// use an integer for version numbers
1+
// Use an integer for version numbers
22
version = 1
33

44
cloudstream {
5-
// All of these properties are optional, you can safely remove them
5+
// All of these properties are optional, you can safely remove any of them.
66

77
description = "Watch content from Dailymotion"
88
authors = listOf("Luna712")
99

1010
/**
11-
* Status int as the following:
11+
* Status int as one of the following:
1212
* 0: Down
1313
* 1: Ok
1414
* 2: Slow
15-
* 3: Beta only
16-
* */
17-
status = 1 // will be 3 if unspecified
15+
* 3: Beta-only
16+
**/
17+
status = 1 // Will be 3 if unspecified
1818

19-
// List of video source types. Users are able to filter for extensions in a given category.
20-
// You can find a list of available types here:
21-
// https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html
2219
tvTypes = listOf("Others")
2320
iconUrl = "https://www.google.com/s2/favicons?domain=www.dailymotion.com&sz=%size%"
2421
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="com.example"/>
2+
<manifest />

InvidiousProvider/build.gradle.kts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
// use an integer for version numbers
1+
// Use an integer for version numbers
22
version = 6
33

44
cloudstream {
5-
// All of these properties are optional, you can safely remove them
5+
// All of these properties are optional, you can safely remove any of them.
66

77
description = "Watch content from any invidious instance"
88
authors = listOf("Cloudburst")
99

1010
/**
11-
* Status int as the following:
11+
* Status int as one of the following:
1212
* 0: Down
1313
* 1: Ok
1414
* 2: Slow
15-
* 3: Beta only
16-
* */
17-
status = 1 // will be 3 if unspecified
15+
* 3: Beta-only
16+
**/
17+
status = 1 // Will be 3 if unspecified
1818

19-
// List of video source types. Users are able to filter for extensions in a given category.
20-
// You can find a list of available types here:
21-
// https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html
2219
tvTypes = listOf("Others")
2320
iconUrl = "https://www.google.com/s2/favicons?domain=invidious.io&sz=%size%"
2421
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="com.example"/>
2+
<manifest />

TwitchProvider/build.gradle.kts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
// use an integer for version numbers
1+
// Use an integer for version numbers
22
version = 1
33

44
cloudstream {
5-
// All of these properties are optional, you can safely remove them
5+
// All of these properties are optional, you can safely remove any of them.
66

77
description = "Watch livestreams from Twitch"
88
authors = listOf("CranberrySoup")
99

1010
/**
11-
* Status int as the following:
11+
* Status int as one of the following:
1212
* 0: Down
1313
* 1: Ok
1414
* 2: Slow
15-
* 3: Beta only
16-
* */
17-
status = 1 // will be 3 if unspecified
15+
* 3: Beta-only
16+
**/
17+
status = 1 // Will be 3 if unspecified
1818

19-
// List of video source types. Users are able to filter for extensions in a given category.
20-
// You can find a list of available types here:
21-
// https://recloudstream.github.io/dokka/-cloudstream/com.lagradost.cloudstream3/-tv-type/index.html
2219
tvTypes = listOf("Live")
2320
iconUrl = "https://www.google.com/s2/favicons?domain=twitch.tv&sz=%size%"
2421
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="com.example"/>
2+
<manifest />

build.gradle.kts

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import com.lagradost.cloudstream3.gradle.CloudstreamExtension
21
import com.android.build.gradle.BaseExtension
2+
import com.lagradost.cloudstream3.gradle.CloudstreamExtension
3+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4+
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
35

46
buildscript {
57
repositories {
@@ -10,10 +12,10 @@ buildscript {
1012
}
1113

1214
dependencies {
13-
classpath("com.android.tools.build:gradle:7.0.4")
15+
classpath("com.android.tools.build:gradle:8.7.3")
1416
// Cloudstream gradle plugin which makes everything work and builds plugins
1517
classpath("com.github.recloudstream:gradle:-SNAPSHOT")
16-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21")
18+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0")
1719
}
1820
}
1921

@@ -41,45 +43,47 @@ subprojects {
4143
}
4244

4345
android {
46+
namespace = "recloudstream"
47+
4448
defaultConfig {
4549
minSdk = 21
46-
compileSdkVersion(33)
47-
targetSdk = 33
50+
compileSdkVersion(35)
51+
targetSdk = 35
4852
}
4953

5054
compileOptions {
5155
sourceCompatibility = JavaVersion.VERSION_1_8
5256
targetCompatibility = JavaVersion.VERSION_1_8
5357
}
5458

55-
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
56-
kotlinOptions {
57-
jvmTarget = "1.8" // Required
58-
// Disables some unnecessary features
59-
freeCompilerArgs = freeCompilerArgs +
60-
"-Xno-call-assertions" +
61-
"-Xno-param-assertions" +
62-
"-Xno-receiver-assertions"
59+
tasks.withType<KotlinJvmCompile> {
60+
compilerOptions {
61+
jvmTarget.set(JvmTarget.JVM_1_8) // Required
62+
freeCompilerArgs.addAll(
63+
"-Xno-call-assertions",
64+
"-Xno-param-assertions",
65+
"-Xno-receiver-assertions"
66+
)
6367
}
6468
}
6569
}
6670

6771
dependencies {
68-
val apk by configurations
72+
val cloudstream by configurations
6973
val implementation by configurations
7074

71-
// Stubs for all Cloudstream classes
72-
apk("com.lagradost:cloudstream3:pre-release")
75+
// Stubs for all cloudstream classes
76+
cloudstream("com.lagradost:cloudstream3:pre-release")
7377

74-
// these dependencies can include any of those which are added by the app,
75-
// but you dont need to include any of them if you dont need them
76-
// https://github.com/recloudstream/cloudstream/blob/master/app/build.gradle
77-
implementation(kotlin("stdlib")) // adds standard kotlin features, like listOf, mapOf etc
78-
implementation("com.github.Blatzar:NiceHttp:0.4.11") // http library
79-
implementation("org.jsoup:jsoup:1.16.2") // html parser
78+
// These dependencies can include any of those which are added by the app,
79+
// but you don't need to include any of them if you don't need them.
80+
// https://github.com/recloudstream/cloudstream/blob/master/app/build.gradle.kts
81+
implementation(kotlin("stdlib")) // Adds Standard Kotlin Features
82+
implementation("com.github.Blatzar:NiceHttp:0.4.11") // HTTP Lib
83+
implementation("org.jsoup:jsoup:1.18.3") // HTML Parser
8084
}
8185
}
8286

8387
task<Delete>("clean") {
84-
delete(rootProject.buildDir)
85-
}
88+
delete(rootProject.layout.buildDirectory)
89+
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Sun Feb 20 16:26:11 CET 2022
21
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
2+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
43
distributionPath=wrapper/dists
54
zipStorePath=wrapper/dists
65
zipStoreBase=GRADLE_USER_HOME

settings.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
rootProject.name = "CloudstreamPlugins"
22

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

56
val disabled = listOf<String>()
67

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

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

0 commit comments

Comments
 (0)