Skip to content

Commit

Permalink
Merge pull request #981 from mikepenz/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
mikepenz committed May 1, 2024
2 parents ecae95a + dcb7930 commit 256c035
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -39,7 +39,7 @@

## Latest releases 🛠

- Kotlin && Multiplatform && Compose && Plugin | [v11.1.3](https://github.com/mikepenz/AboutLibraries/tree/v11.1.3)
- Kotlin && Multiplatform && Compose && Plugin | [v11.1.4](https://github.com/mikepenz/AboutLibraries/tree/v11.1.4)

## Gradle Plugin

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
@@ -1,7 +1,7 @@
GROUP=com.mikepenz

VERSION_NAME=11.1.3
VERSION_CODE=110103
VERSION_NAME=11.1.4
VERSION_CODE=110104
POM_URL=https://github.com/mikepenz/AboutLibraries
POM_SCM_URL=https://github.com/mikepenz/AboutLibraries
POM_SCM_CONNECTION=scm:git@github.com:mikepenz/AboutLibraries.git
Expand Down
Expand Up @@ -3,7 +3,12 @@ package com.mikepenz.aboutlibraries.plugin
import com.mikepenz.aboutlibraries.plugin.model.CollectedContainer
import com.mikepenz.aboutlibraries.plugin.util.DependencyCollector
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.*
import org.gradle.api.tasks.CacheableTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.TaskAction
import org.slf4j.LoggerFactory
import java.io.File

@CacheableTask
Expand All @@ -12,6 +17,9 @@ abstract class AboutLibrariesCollectorTask : DefaultTask() {
@Internal
protected val extension = project.extensions.getByName("aboutLibraries") as AboutLibrariesExtension

@Input
val projectName = project.name

@Input
val includePlatform = extension.includePlatform

Expand All @@ -37,9 +45,14 @@ abstract class AboutLibrariesCollectorTask : DefaultTask() {

@TaskAction
fun action() {
LOGGER.info("Collecting for: $projectName")
if (!::collectedDependencies.isInitialized) {
configure()
}
dependencyCache.writeText(groovy.json.JsonOutput.toJson(collectedDependencies))
}

private companion object {
private val LOGGER = LoggerFactory.getLogger(AboutLibrariesCollectorTask::class.java)!!
}
}
Expand Up @@ -69,9 +69,9 @@ class AboutLibrariesPlugin : Plugin<Project> {

private val Project.experimentalCache: Boolean
get() = hasProperty("org.gradle.unsafe.configuration-cache") &&
property("org.gradle.unsafe.configuration-cache") == "true" ||
hasProperty("org.gradle.configuration-cache") &&
property("org.gradle.configuration-cache") == "true"
property("org.gradle.unsafe.configuration-cache") == "true" ||
hasProperty("org.gradle.configuration-cache") &&
property("org.gradle.configuration-cache") == "true"


companion object {
Expand Down
Expand Up @@ -13,7 +13,7 @@ import java.io.OutputStreamWriter
import java.net.URL

internal class GitHubApi(
private val gitHubToken: String? = null
private val gitHubToken: String? = null,
) : IApi {
private var rateLimit: Int = 0

Expand All @@ -36,7 +36,7 @@ internal class GitHubApi(
}
limit
} catch (t: Throwable) {
LOGGER.error("Could not retrieve `rate_limit`. Please check if the token is provided.")
LOGGER.error("Could not retrieve `rate_limit`. Please check if the token is provided. (${t.message})")
0
}
}
Expand Down

0 comments on commit 256c035

Please sign in to comment.