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

Update various dependencies and plugins #137

Merged
merged 8 commits into from
Dec 27, 2020
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
java-version: ${{ matrix.java-version }}

- name: Run Build
run: ./gradlew clean build jar docsJar sourcesJar testsJar reportsZip generatePomFileForMavenPublication -s --scan
run: ./gradlew clean ktlintCheck build jar docsJar sourcesJar testsJar reportsZip generatePomFileForMavenPublication -s --scan

- name: Upload Artifacts to Github
uses: actions/upload-artifact@v2
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
plugins {
id 'com.jfrog.artifactory' version '4.13.0'
id 'com.jfrog.bintray' version '1.8.4'
id 'com.github.ben-manes.versions' version '0.28.0'
id 'com.jfrog.artifactory' version '4.18.2'
id 'com.jfrog.bintray' version '1.8.5'
id 'com.github.ben-manes.versions' version '0.36.0'
id 'com.gradle.plugin-publish' version '0.12.0'
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
id 'org.jetbrains.kotlin.jvm' version '1.4.10'
id 'org.jetbrains.dokka' version '0.10.1'
id 'org.jlleitschuh.gradle.ktlint' version '9.2.1'
id 'org.jlleitschuh.gradle.ktlint' version '9.4.1'
id 'java-gradle-plugin'
id 'groovy'
id 'maven-publish'
Expand Down
9 changes: 4 additions & 5 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ext.versions = [
'java' : '1.8',
'kotlin': '1.3.61',
'kotlin': '1.4.10',
]

ext.deps = [
Expand All @@ -13,9 +13,8 @@ ext.deps = [
],
],
'kotlinx': [
'html': 'org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.1',
'html': 'org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2',
],
'ktlint': 'com.github.shyiko:ktlint:0.36.0',
'gson': 'com.google.code.gson:gson:2.8.6',
'android': [
'tools': [
Expand All @@ -24,8 +23,8 @@ ext.deps = [
]
]
],
'spock' : 'org.spockframework:spock-core:1.1-groovy-2.4',
'spock' : 'org.spockframework:spock-core:1.3-groovy-2.5',
'xmlunit': [
'matchers': 'org.xmlunit:xmlunit-matchers:2.6.3',
'matchers': 'org.xmlunit:xmlunit-matchers:2.8.2',
]
]
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.gradle.enterprise" version "3.1.1"
id "com.gradle.enterprise" version "3.4.1"
}

rootProject.name = 'gradle-license-plugin'
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/com/jaredsburrows/license/LicensePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import com.android.build.gradle.FeaturePlugin
import com.android.build.gradle.LibraryExtension
import com.android.build.gradle.LibraryPlugin
import com.android.build.gradle.api.BaseVariant
import java.io.File
import kotlin.reflect.KClass
import org.gradle.api.DomainObjectSet
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.plugins.ExtensionContainer
import org.gradle.api.plugins.JavaPlugin
import java.io.File
import kotlin.reflect.KClass

/** A [Plugin] which grabs the POM.xml files from maven dependencies. */
class LicensePlugin : Plugin<Project> {
Expand Down
10 changes: 6 additions & 4 deletions src/main/kotlin/com/jaredsburrows/license/LicenseReportTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import groovy.util.Node
import groovy.util.NodeList
import groovy.util.XmlParser
import groovy.xml.QName
import java.io.File
import java.net.URI
import java.net.URL
import java.util.UUID
import org.gradle.api.DefaultTask
import org.gradle.api.Task
import org.gradle.api.artifacts.Configuration
Expand All @@ -24,6 +20,10 @@ import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.TaskAction
import java.io.File
import java.net.URI
import java.net.URL
import java.util.UUID

/**
* A [Task] that creates HTML and JSON reports of the current projects dependencies.
Expand All @@ -36,8 +36,10 @@ open class LicenseReportTask : DefaultTask() { // tasks can't be final
@Input var generateJsonReport = false
@Input var copyHtmlReportToAssets = false
@Input var copyJsonReportToAssets = false

@Optional @Input
var buildType: String? = null

@Optional @Input
var variantName: String? = null
@Internal var productFlavors = listOf<ProductFlavor>()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.jaredsburrows.license.internal

import org.gradle.api.UncheckedIOException
import java.io.File
import java.io.IOException
import java.net.URI
import java.net.URISyntaxException
import org.gradle.api.UncheckedIOException

/**
* Renders information in a format suitable for logging to the console.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,14 @@ fun FlowOrInteractiveOrPhrasingContent.a(
block: A.() -> Unit = {}
): Unit = A(
attributesMapOf(
"href", href,
"target", target,
"class", classes,
"name", name
"href",
href,
"target",
target,
"class",
classes,
"name",
name
),
consumer
)
Expand Down