mirror of
https://github.com/recloudstream/gradle.git
synced 2024-08-14 23:56:59 +00:00
add file size if extension built before json task
This commit is contained in:
parent
964c425973
commit
ba11261aac
4 changed files with 5 additions and 1 deletions
|
@ -37,6 +37,7 @@ abstract class CloudstreamExtension @Inject constructor(project: Project) {
|
||||||
}
|
}
|
||||||
|
|
||||||
internal var pluginClassName: String? = null
|
internal var pluginClassName: String? = null
|
||||||
|
internal var fileSize: Long? = null
|
||||||
|
|
||||||
var requiresResources = false
|
var requiresResources = false
|
||||||
var description: String? = null
|
var description: String? = null
|
||||||
|
|
|
@ -47,6 +47,7 @@ fun Project.makePluginEntry(): PluginEntry {
|
||||||
language = extension.language,
|
language = extension.language,
|
||||||
iconUrl = extension.iconUrl,
|
iconUrl = extension.iconUrl,
|
||||||
apiVersion = extension.apiVersion,
|
apiVersion = extension.apiVersion,
|
||||||
tvTypes = extension.tvTypes
|
tvTypes = extension.tvTypes,
|
||||||
|
fileSize = extension.fileSize
|
||||||
)
|
)
|
||||||
}
|
}
|
|
@ -8,6 +8,7 @@ data class PluginEntry(
|
||||||
val internalName: String,
|
val internalName: String,
|
||||||
val authors: List<String>,
|
val authors: List<String>,
|
||||||
val description: String?,
|
val description: String?,
|
||||||
|
val fileSize: Long?,
|
||||||
val repositoryUrl: String?,
|
val repositoryUrl: String?,
|
||||||
val language: String?,
|
val language: String?,
|
||||||
val tvTypes: List<String>?,
|
val tvTypes: List<String>?,
|
||||||
|
|
|
@ -116,6 +116,7 @@ fun registerTasks(project: Project) {
|
||||||
zip.destinationDirectory.set(project.buildDir)
|
zip.destinationDirectory.set(project.buildDir)
|
||||||
|
|
||||||
it.doLast { task ->
|
it.doLast { task ->
|
||||||
|
extension.fileSize = task.outputs.files.singleFile.length()
|
||||||
task.logger.lifecycle("Made Cloudstream package at ${task.outputs.files.singleFile}")
|
task.logger.lifecycle("Made Cloudstream package at ${task.outputs.files.singleFile}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue