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
Prepare rc8 #1011
Merged
Merged
Prepare rc8 #1011
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b4c22e7
Update gradle-build dependencies
arturbosch f2a870e
Document dokka exclusion from build to save time for contributors
arturbosch 7ef5126
Fix gradle-plugin's group to publish it again under the same bintray …
arturbosch e1cc376
Fix detekt issues
arturbosch 61e5d86
Configure bintray uploading for the gradle-plugin
arturbosch e9b491a
Update detekt version to RC8
arturbosch 413cab5
Update used detekt version
arturbosch File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
import com.jfrog.bintray.gradle.BintrayExtension | ||
import org.jetbrains.dokka.gradle.DokkaTask | ||
import java.util.Date | ||
|
||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
|
@@ -13,11 +17,17 @@ repositories { | |
plugins { | ||
`java-gradle-plugin` | ||
id("com.gradle.plugin-publish") version "0.9.10" | ||
id("com.jfrog.bintray") version "1.8.4" | ||
kotlin("jvm") version "1.2.41" | ||
id("org.jetbrains.dokka") version "0.9.17" | ||
} | ||
|
||
apply { | ||
plugin("maven-publish") | ||
} | ||
|
||
group = "io.gitlab.arturbosch" | ||
version = "1.0.0.RC7-3" | ||
group = "io.gitlab.arturbosch.detekt" | ||
version = "1.0.0.RC8" | ||
|
||
val spekVersion = "1.1.5" | ||
val junitPlatformVersion = "1.2.0" | ||
|
@@ -49,7 +59,7 @@ val test by tasks.getting(Test::class) { | |
} | ||
|
||
pluginBundle { | ||
website = "https://github.com/arturbosch/detekt" | ||
website = "https://arturbosch.github.io/detekt" | ||
vcsUrl = "https://github.com/arturbosch/detekt" | ||
description = "Static code analysis for Kotlin" | ||
tags = listOf("kotlin", "detekt", "code-analysis", "badsmells", "codesmells") | ||
|
@@ -61,3 +71,91 @@ pluginBundle { | |
} | ||
} | ||
} | ||
|
||
bintray { | ||
user = System.getenv("BINTRAY_USER") ?: "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm glad that you have automated the bintray publishing. |
||
key = System.getenv("BINTRAY_API_KEY") ?: "" | ||
val mavenCentralUser = System.getenv("MAVEN_CENTRAL_USER") ?: "" | ||
val mavenCentralPassword = System.getenv("MAVEN_CENTRAL_PW") ?: "" | ||
|
||
setPublications("DetektPublication") | ||
|
||
pkg(delegateClosureOf<BintrayExtension.PackageConfig> { | ||
repo = "code-analysis" | ||
name = "detekt" | ||
userOrg = "arturbosch" | ||
setLicenses("Apache-2.0") | ||
vcsUrl = "https://github.com/arturbosch/detekt" | ||
|
||
version(delegateClosureOf<BintrayExtension.VersionConfig> { | ||
name = project.version as? String | ||
released = Date().toString() | ||
|
||
gpg(delegateClosureOf<BintrayExtension.GpgConfig> { | ||
sign = true | ||
}) | ||
|
||
mavenCentralSync(delegateClosureOf<BintrayExtension.MavenCentralSyncConfig> { | ||
sync = true | ||
user = mavenCentralUser | ||
password = mavenCentralPassword | ||
close = "1" | ||
}) | ||
}) | ||
}) | ||
} | ||
|
||
tasks.withType(DokkaTask::class.java) { | ||
// suppresses undocumented classes but not dokka warnings | ||
// https://github.com/Kotlin/dokka/issues/229 && https://github.com/Kotlin/dokka/issues/319 | ||
reportUndocumented = false | ||
outputFormat = "javadoc" | ||
outputDirectory = "$buildDir/javadoc" | ||
} | ||
|
||
val sourcesJar by tasks.creating(Jar::class) { | ||
dependsOn("classes") | ||
classifier = "sources" | ||
from(the<JavaPluginConvention>().sourceSets["main"].allSource) | ||
} | ||
|
||
val javadocJar by tasks.creating(Jar::class) { | ||
dependsOn("dokka") | ||
classifier = "javadoc" | ||
from(buildDir.resolve("javadoc")) | ||
} | ||
|
||
artifacts { | ||
add("archives", sourcesJar) | ||
add("archives", javadocJar) | ||
} | ||
|
||
configure<PublishingExtension> { | ||
publications.create<MavenPublication>("DetektPublication") { | ||
from(components["java"]) | ||
artifact(sourcesJar) | ||
artifact(javadocJar) | ||
groupId = rootProject.group as? String | ||
artifactId = rootProject.name | ||
version = rootProject.version as? String | ||
pom.withXml { | ||
asNode().apply { | ||
appendNode("description", "Static code analysis for Kotlin") | ||
appendNode("name", "detekt") | ||
appendNode("url", "https://github.com/arturbosch/detekt") | ||
|
||
val license = appendNode("licenses").appendNode("license") | ||
license.appendNode("name", "The Apache Software License, Version 2.0") | ||
license.appendNode("url", "http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
license.appendNode("distribution", "repo") | ||
|
||
val developer = appendNode("developers").appendNode("developer") | ||
developer.appendNode("id", "Artur Bosch") | ||
developer.appendNode("name", "Artur Bosch") | ||
developer.appendNode("email", "arturbosch@gmx.de") | ||
|
||
appendNode("scm").appendNode("url", "https://github.com/arturbosch/detekt") | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(y)