-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
Prepare rc8 #1011
Changes from 6 commits
b4c22e7
f2a870e
7ef5126
e1cc376
61e5d86
e9b491a
413cab5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,13 @@ | |
|
||
- Read [this article](https://chris.beams.io/posts/git-commit/) before writing commit messages | ||
- Copy the file `commit-msg` to `.git/hooks` | ||
- Use `gradle build -x dokka` to build the source but exclude documentation jar generating to save time. | ||
- `gradle detektCheck` should not report any errors | ||
- This repo uses tabs! Make sure your code is properly formatted. | ||
- Use idea-code-style.xml for coding style . | ||
- We use [Spek](https://github.com/spekframework/spek) for testing. | ||
- Feel free to add your name to the contributors list at the end of the readme file when opening a pull request. | ||
- The code in `detekt-api`and any rule in `detekt-rules` must be documented. We generate documentation for our website based on this modules. | ||
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. missing space between |
||
|
||
### Specific code style rules we use | ||
|
||
|
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") | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
detektVersion=1.0.0.RC7-3 | ||
detektVersion=1.0.0.RC8 | ||
usedDetektVersion=1.0.0.RC7-3 | ||
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.
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. jap, after bintray stuff is uploaded to not get the CI errors :) |
||
ktlintVersion=0.24.0 | ||
kotlinVersion=1.2.51 | ||
|
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)