added apiVersion

This commit is contained in:
C10udburst 2022-08-08 12:35:17 +02:00
parent 8f5776e0f3
commit 0df1fcdf08
4 changed files with 9 additions and 3 deletions

View file

@ -9,6 +9,8 @@ import javax.inject.Inject
abstract class CloudstreamExtension @Inject constructor(project: Project) {
val userCache = project.gradle.gradleUserHomeDir.resolve("caches").resolve("cloudstream")
val apiVersion = 1
var apkinfo: ApkInfo? = null
internal set

View file

@ -19,7 +19,8 @@ fun Project.makeManifest(): PluginManifest {
return PluginManifest(
pluginClassName = extension.pluginClassName,
name = this.name,
pluginVersion = this.version.toString()
pluginVersion = this.version.toString(),
apiVersion = extension.apiVersion
)
}
@ -41,6 +42,7 @@ fun Project.makePluginEntry(): PluginEntry {
authors = extension.authors.getOrElse(listOf()),
description = extension.description.orNull,
repositoryUrl = (if (repo == null) null else repo.url),
isAdult = extension.adult.getOrElse(false)
isAdult = extension.adult.getOrElse(false),
apiVersion = extension.apiVersion
)
}

View file

@ -10,4 +10,5 @@ data class PluginEntry(
val description: String?,
val repositoryUrl: String?,
val isAdult: Boolean,
val apiVersion: Int
)

View file

@ -3,5 +3,6 @@ package com.lagradost.cloudstream3.gradle.entities
data class PluginManifest(
val pluginClassName: String?,
val name: String,
val pluginVersion: String
val pluginVersion: String,
val apiVersion: Int
)