update build.gradle to merge common configurations tasks, upgrade gradle to 6.8 and update checkstyle rule (#104)
This commit is contained in:
Родитель
dc5b1f1a43
Коммит
fa1c232f22
|
@ -15,11 +15,10 @@ dependencies {
|
|||
implementation 'org.apache.maven:maven-artifact:3.8.1'
|
||||
implementation 'org.fusesource.jansi:jansi:1.18'
|
||||
|
||||
implementation 'com.microsoft.azure:azure-toolkit-common-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-resource-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-applicationinsights-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-appservice-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-applicationinsights-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-common-lib:' + azureToolkitVersion
|
||||
implementation 'com.microsoft.azure:azure-toolkit-resource-lib:' + azureToolkitVersion
|
||||
implementation 'com.microsoft.azure:azure-toolkit-appservice-lib:' + azureToolkitVersion
|
||||
implementation 'com.microsoft.azure:azure-toolkit-applicationinsights-lib:' + azureToolkitVersion
|
||||
|
||||
implementation project(':azure-gradle-plugins-common')
|
||||
|
||||
|
@ -60,18 +59,3 @@ pluginBundle {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
task setupPluginPublishSecret {
|
||||
doLast {
|
||||
def key = credentials['gradle.publish.key']
|
||||
def secret = credentials['gradle.publish.secret']
|
||||
if( !key || !secret) {
|
||||
throw new RuntimeException("gradlePublishKey and/or gradlePublishSecret are not defined")
|
||||
}
|
||||
|
||||
System.properties.setProperty("gradle.publish.key", key)
|
||||
System.properties.setProperty("gradle.publish.secret", secret)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.publishPlugins.dependsOn tasks.setupPluginPublishSecret
|
||||
|
|
|
@ -1,16 +1,62 @@
|
|||
ext {
|
||||
projectShortName = "azure-gradle-plugins-common"
|
||||
projectName = "Common Lib for Azure Gradle Plugins"
|
||||
projectDescription = "A common lib for sharing code among azure gradle plugins"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile gradleApi()
|
||||
|
||||
implementation 'commons-io:commons-io:2.10.0'
|
||||
implementation 'org.apache.commons:commons-lang3:3.12.0'
|
||||
implementation 'com.google.guava:guava:30.1.1-jre'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-common-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-resource-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-appservice-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-applicationinsights-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-common-lib:' + azureToolkitVersion
|
||||
implementation 'com.microsoft.azure:azure-toolkit-resource-lib:' + azureToolkitVersion
|
||||
implementation 'com.microsoft.azure:azure-toolkit-appservice-lib:' + azureToolkitVersion
|
||||
implementation 'com.microsoft.azure:azure-toolkit-applicationinsights-lib:' + azureToolkitVersion
|
||||
testImplementation "junit:junit:4.13.2"
|
||||
testImplementation "org.mockito:mockito-core:3.11.2"
|
||||
|
||||
compileOnly 'org.projectlombok:lombok:1.18.20'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.20'
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourceJar
|
||||
artifact javadocJar
|
||||
pom {
|
||||
name = projectName
|
||||
description = projectDescription
|
||||
url = "https://github.com/microsoft/azure-gradle-plugins/tree/master/" + projectShortName
|
||||
licenses {
|
||||
license {
|
||||
name = "MIT License"
|
||||
url = "https://opensource.org/licenses/MIT"
|
||||
distribution = "repo"
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = "andxu"
|
||||
name = "Andy Xu"
|
||||
email = "andxu@microsoft.com"
|
||||
}
|
||||
|
||||
developer {
|
||||
id = "Flanker32"
|
||||
name = "Hanxiao Liu"
|
||||
email = "hanli@microsoft.com"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = "scm:git:https://github.com/microsoft/azure-gradle-plugins"
|
||||
developerConnection = "scm:git:git@github.com:microsoft/azure-gradle-plugins"
|
||||
url = "https://github.com/microsoft/azure-gradle-plugins/tree/master/" + projectShortName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,20 +9,25 @@ dependencies {
|
|||
implementation 'org.apache.commons:commons-lang3:3.12.0'
|
||||
implementation 'com.google.code.gson:gson:2.8.7'
|
||||
implementation 'com.google.guava:guava:30.1.1-jre'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-common-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-resource-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-applicationinsights-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-appservice-lib:0.11.0-SNAPSHOT'
|
||||
implementation 'com.microsoft.azure:azure-toolkit-applicationinsights-lib:0.11.0-SNAPSHOT'
|
||||
|
||||
implementation 'org.fusesource.jansi:jansi:1.18'
|
||||
implementation 'com.microsoft.azure:applicationinsights-core:2.6.3'
|
||||
implementation 'org.apache.maven:maven-artifact:3.8.1'
|
||||
implementation 'com.networknt:json-schema-validator:1.0.56'
|
||||
implementation project(':azure-gradle-plugins-common')
|
||||
testImplementation "junit:junit:4.13.2"
|
||||
testImplementation "org.mockito:mockito-core:3.11.2"
|
||||
|
||||
|
||||
implementation 'com.microsoft.azure:azure-toolkit-common-lib:' + azureToolkitVersion
|
||||
implementation 'com.microsoft.azure:azure-toolkit-resource-lib:' + azureToolkitVersion
|
||||
implementation 'com.microsoft.azure:azure-toolkit-appservice-lib:' + azureToolkitVersion
|
||||
implementation 'com.microsoft.azure:azure-toolkit-applicationinsights-lib:' + azureToolkitVersion
|
||||
|
||||
compileOnly 'org.projectlombok:lombok:1.18.20'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.20'
|
||||
|
||||
implementation project(':azure-gradle-plugins-common')
|
||||
|
||||
testImplementation "junit:junit:4.13.2"
|
||||
testImplementation "org.mockito:mockito-core:3.11.2"
|
||||
}
|
||||
|
||||
jar {
|
||||
|
@ -55,18 +60,3 @@ pluginBundle {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
task setupPluginPublishSecret {
|
||||
doLast {
|
||||
def key = credentials['gradle.publish.key']
|
||||
def secret = credentials['gradle.publish.secret']
|
||||
if( !key || !secret) {
|
||||
throw new RuntimeException("gradlePublishKey and/or gradlePublishSecret are not defined")
|
||||
}
|
||||
|
||||
System.properties.setProperty("gradle.publish.key", key)
|
||||
System.properties.setProperty("gradle.publish.secret", secret)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.publishPlugins.dependsOn tasks.setupPluginPublishSecret
|
||||
|
|
119
build.gradle
119
build.gradle
|
@ -22,51 +22,7 @@ class PrepareResourceTask extends DefaultTask {
|
|||
}
|
||||
}
|
||||
|
||||
configure(subprojects.findAll {it.name != 'azure-gradle-plugins-common'}) {
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'checkstyle'
|
||||
apply plugin: 'project-report'
|
||||
apply plugin: 'java-gradle-plugin'
|
||||
apply plugin: 'com.gradle.plugin-publish'
|
||||
apply plugin: 'nu.studer.credentials'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
checkstyle {
|
||||
toolVersion '8.36.1';
|
||||
// Whether or not to allow the build to continue if there are warnings.
|
||||
ignoreFailures = false
|
||||
|
||||
// Whether or not rule violations are to be displayed on the console.
|
||||
showViolations = true
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
task prepareResources(type: PrepareResourceTask) {
|
||||
currentProject = project
|
||||
}
|
||||
|
||||
task prepareReleaseResources(type: PrepareResourceTask) {
|
||||
currentProject = project
|
||||
release = true
|
||||
}
|
||||
|
||||
compileJava.doFirst {
|
||||
if (targetCompatibility != '1.8') throw new RuntimeException("This project shall be compiled with targetCompatibility = 1.8 " +
|
||||
"but targetCompatibility is actually "
|
||||
+ targetCompatibility)
|
||||
}
|
||||
}
|
||||
|
||||
configure(subprojects.findAll {it.name == 'azure-gradle-plugins-common'}) {
|
||||
subprojects {
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'checkstyle'
|
||||
|
@ -75,8 +31,13 @@ configure(subprojects.findAll {it.name == 'azure-gradle-plugins-common'}) {
|
|||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
ext {
|
||||
azureToolkitVersion = "0.11.0-SNAPSHOT"
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
toolVersion '8.36.1';
|
||||
|
||||
// Whether or not to allow the build to continue if there are warnings.
|
||||
ignoreFailures = false
|
||||
|
||||
|
@ -99,47 +60,39 @@ configure(subprojects.findAll {it.name == 'azure-gradle-plugins-common'}) {
|
|||
archiveClassifier = "sources"
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourceJar
|
||||
artifact javadocJar
|
||||
pom {
|
||||
name = "Common Lib for Azure Gradle Plugins"
|
||||
description = "A common lib for sharing code among azure gradle plugins"
|
||||
url = "https://github.com/microsoft/azure-gradle-plugins/tree/master/azure-gradle-plugins-common"
|
||||
licenses {
|
||||
license {
|
||||
name = "MIT License"
|
||||
url = "https://opensource.org/licenses/MIT"
|
||||
distribution = "repo"
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = "andxu"
|
||||
name = "Andy Xu"
|
||||
email = "andxu@microsoft.com"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = "scm:git:https://github.com/microsoft/azure-gradle-plugins"
|
||||
developerConnection = "scm:git:git@github.com:microsoft/azure-gradle-plugins"
|
||||
url = "https://github.com/microsoft/azure-gradle-plugins/tree/master/azure-gradle-plugins-common"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compileJava.doFirst {
|
||||
if (targetCompatibility != '1.8') throw new RuntimeException("This project shall be compiled with targetCompatibility = 1.8 " +
|
||||
"but targetCompatibility is actually "
|
||||
+ targetCompatibility)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
configure(subprojects.findAll {it.name != 'azure-gradle-plugins-common'}) {
|
||||
apply plugin: 'java-gradle-plugin'
|
||||
apply plugin: 'com.gradle.plugin-publish'
|
||||
|
||||
task prepareResources(type: PrepareResourceTask) {
|
||||
currentProject = project
|
||||
}
|
||||
|
||||
task prepareReleaseResources(type: PrepareResourceTask) {
|
||||
currentProject = project
|
||||
release = true
|
||||
}
|
||||
|
||||
task setupPluginPublishSecret {
|
||||
doLast {
|
||||
def key = credentials['gradle.publish.key']
|
||||
def secret = credentials['gradle.publish.secret']
|
||||
if( !key || !secret) {
|
||||
throw new RuntimeException("gradlePublishKey and/or gradlePublishSecret are not defined")
|
||||
}
|
||||
|
||||
System.properties.setProperty("gradle.publish.key", key)
|
||||
System.properties.setProperty("gradle.publish.secret", secret)
|
||||
}
|
||||
}
|
||||
tasks.publishPlugins.dependsOn tasks.setupPluginPublishSecret
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ page at https://checkstyle.org/config.html -->
|
|||
|
||||
<module name="Checker">
|
||||
<property name="charset" value="UTF-8"/>
|
||||
|
||||
<property name="fileExtensions" value="java, properties, xml"/>
|
||||
<module name="SuppressionFilter">
|
||||
<property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
|
||||
</module>
|
||||
|
@ -26,17 +26,17 @@ page at https://checkstyle.org/config.html -->
|
|||
<property name="eachLine" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="NewlineAtEndOfFile">
|
||||
<property name="lineSeparator" value="lf"/>
|
||||
</module>
|
||||
<!-- <module name="NewlineAtEndOfFile">-->
|
||||
<!-- <property name="lineSeparator" value="lf"/>-->
|
||||
<!-- </module>-->
|
||||
|
||||
<module name="RegexpSingleline">
|
||||
<!-- Checks that FIXME is not used in comments. TODO is preferred.
|
||||
-->
|
||||
<property name="format" value="((//.*)|(\*.*))FIXME"/>
|
||||
<property name="message"
|
||||
value='TODO is preferred to FIXME. e.g. "TODO(johndoe): Refactor when v2 is released."'/>
|
||||
</module>
|
||||
<!-- <module name="RegexpSingleline">-->
|
||||
<!-- <!– Checks that FIXME is not used in comments. TODO is preferred.-->
|
||||
<!-- –>-->
|
||||
<!-- <property name="format" value="((//.*)|(\*.*))FIXME"/>-->
|
||||
<!-- <property name="message"-->
|
||||
<!-- value='TODO is preferred to FIXME. e.g. "TODO(johndoe): Refactor when v2 is released."'/>-->
|
||||
<!-- </module>-->
|
||||
|
||||
|
||||
<!-- No trailing spaces allowed -->
|
||||
|
@ -51,19 +51,19 @@ page at https://checkstyle.org/config.html -->
|
|||
<property name="message" value="CRLF and CR line endings are prohibited, but this file uses them."/>
|
||||
</module>
|
||||
|
||||
<module name="RegexpSingleline">
|
||||
<!-- Checks that TODOs are named. (Actually, just that they are followed
|
||||
by an open paren.)
|
||||
-->
|
||||
<property name="format" value="((//.*)|(\*.*))TODO [^(]"/>
|
||||
<property name="message"
|
||||
value='All TODOs should be named. e.g. "TODO (johndoe): Refactor when v2 is released."'/>
|
||||
</module>
|
||||
<!-- <module name="RegexpSingleline">-->
|
||||
<!-- <!– Checks that TODOs are named. (Actually, just that they are followed-->
|
||||
<!-- by an open paren.)-->
|
||||
<!-- –>-->
|
||||
<!-- <property name="format" value="((//.*)|(\*.*))TODO [^(]"/>-->
|
||||
<!-- <property name="message"-->
|
||||
<!-- value='All TODOs should be named. e.g. "TODO (johndoe): Refactor when v2 is released."'/>-->
|
||||
<!-- </module>-->
|
||||
|
||||
<module name="LineLengthCheck">
|
||||
<property name="fileExtensions" value="java" />
|
||||
<!-- Checks if a line is too long, default value of 120 is too short -->
|
||||
<property name="max" value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.max}" default="160"/>
|
||||
<property name="max" value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.max}" default="260"/>
|
||||
<property name="severity" value="error"/>
|
||||
|
||||
<!--
|
||||
|
@ -73,8 +73,8 @@ page at https://checkstyle.org/config.html -->
|
|||
-->
|
||||
|
||||
<property name="ignorePattern"
|
||||
value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.ignorePattern}"
|
||||
default="^(package .*;\s*)|(import .*;\s*)|( *\* *https?://.*)$"/>
|
||||
value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.ignorePattern}"
|
||||
default="^(package .*;\s*)|(import .*;\s*)|( *\* *https?://.*)$"/>
|
||||
</module>
|
||||
|
||||
<!-- All Java AST specific tests live under TreeWalker module. -->
|
||||
|
@ -90,13 +90,13 @@ page at https://checkstyle.org/config.html -->
|
|||
<!-- Checks for redundant import statements. -->
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
<module name="InnerAssignment"/>
|
||||
<!-- <module name="InnerAssignment"/>-->
|
||||
<module name="OuterTypeFilename"/>
|
||||
<module name="AvoidEscapedUnicodeCharacters">
|
||||
<property name="allowEscapesForControlCharacters" value="true"/>
|
||||
<property name="allowByTailComment" value="true"/>
|
||||
<property name="allowNonPrintableEscapes" value="true"/>
|
||||
</module>
|
||||
<!-- <module name="AvoidEscapedUnicodeCharacters">-->
|
||||
<!-- <property name="allowEscapesForControlCharacters" value="true"/>-->
|
||||
<!-- <property name="allowByTailComment" value="true"/>-->
|
||||
<!-- <property name="allowNonPrintableEscapes" value="true"/>-->
|
||||
<!-- </module>-->
|
||||
<!--
|
||||
|
||||
NAMING CHECKS
|
||||
|
@ -172,9 +172,6 @@ page at https://checkstyle.org/config.html -->
|
|||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
LENGTH and CODING CHECKS
|
||||
|
@ -182,7 +179,7 @@ page at https://checkstyle.org/config.html -->
|
|||
-->
|
||||
<module name="LeftCurly">
|
||||
<!-- Checks for placement of the left curly brace ('{'). -->
|
||||
<property name="severity" value="warning"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="RightCurly">
|
||||
|
@ -203,7 +200,7 @@ page at https://checkstyle.org/config.html -->
|
|||
</pre>
|
||||
-->
|
||||
<property name="option" value="same"/>
|
||||
<property name="severity" value="warning"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks for braces around if and else blocks -->
|
||||
|
@ -225,7 +222,7 @@ page at https://checkstyle.org/config.html -->
|
|||
-->
|
||||
<property name="reliefPattern"
|
||||
value="fall through|Fall through|fallthru|Fallthru|falls through|Falls through|fallthrough|Fallthrough|No break|NO break|no break|continue on"/>
|
||||
<property name="severity" value="error"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
|
||||
|
@ -259,7 +256,7 @@ page at https://checkstyle.org/config.html -->
|
|||
<message key="ws.notFollowed"
|
||||
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
|
||||
<message key="ws.notPreceded"
|
||||
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
||||
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
|
||||
<module name="WhitespaceAfter">
|
||||
|
@ -292,14 +289,15 @@ page at https://checkstyle.org/config.html -->
|
|||
<!-- Checks that there is no whitespace before close parens or after
|
||||
open parens.
|
||||
-->
|
||||
<property name="severity" value="warning"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
<module name="OperatorWrap">
|
||||
<property name="option" value="EOL"/>
|
||||
<property name="tokens"
|
||||
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
|
@ -380,21 +378,21 @@ page at https://checkstyle.org/config.html -->
|
|||
<property name="tokens" value="VARIABLE_DEF, METHOD_DEF"/>
|
||||
</module>
|
||||
<!-- Only apply this to local variables; Designers seem to prefer using same parameter names as class members. -->
|
||||
<module name="HiddenField">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
</module>
|
||||
<!-- <module name="HiddenField">-->
|
||||
<!-- <property name="tokens" value="VARIABLE_DEF"/>-->
|
||||
<!-- </module>-->
|
||||
<!-- Developer should probably bring up this issue with designer if ever it occurs. -->
|
||||
<module name="EqualsHashCode">
|
||||
<property name="severity" value="info" />
|
||||
<property name="severity" value="error" />
|
||||
</module>
|
||||
<module name="StringLiteralEquality"/>
|
||||
<module name="SimplifyBooleanReturn"/>
|
||||
<module name="SimplifyBooleanExpression"/>
|
||||
<module name="CommentsIndentation"/>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
</module>
|
||||
<!-- <module name="CommentsIndentation"/>-->
|
||||
<!-- <module name="AtclauseOrder">-->
|
||||
<!-- <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>-->
|
||||
<!-- <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>-->
|
||||
<!-- </module>-->
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="id" value="AnnotationLocationMostCases"/>
|
||||
|
@ -405,17 +403,51 @@ page at https://checkstyle.org/config.html -->
|
|||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="allowSamelineMultipleAnnotations" value="true"/>
|
||||
</module>
|
||||
<module name="VariableDeclarationUsageDistance"/>
|
||||
<!-- <module name="VariableDeclarationUsageDistance"/>-->
|
||||
<module name="TypecastParenPad"/>
|
||||
<!-- Added some coding problems as INFO. Up to developer to react to them. -->
|
||||
<module name="CovariantEquals">
|
||||
<property name="severity" value="info"/>
|
||||
</module>
|
||||
<module name="OneTopLevelClass"/>
|
||||
<!-- <module name="OneTopLevelClass"/>-->
|
||||
<module name="NoLineWrap"/>
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="ArrayTypeStyle"/>
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<!-- <module name="MultipleVariableDeclarations"/>-->
|
||||
<!-- <module name="ArrayTypeStyle"/>-->
|
||||
<!-- <module name="MissingSwitchDefault"/>-->
|
||||
|
||||
<!--
|
||||
|
||||
IllegalImport cannot blacklist classes so we have to fall back to Regexp.
|
||||
|
||||
-->
|
||||
|
||||
<!-- forbid use of commons lang validate -->
|
||||
<module name="Regexp">
|
||||
<property name="format" value="org\.apache\.commons\.lang3\.Validate"/>
|
||||
<property name="illegalPattern" value="true"/>
|
||||
<property name="message" value="Use Guava Checks instead of Commons Validate. Please refer to the coding guidelines."/>
|
||||
</module>
|
||||
<!-- forbid the use of com.google.common.annotations.VisibleForTesting -->
|
||||
<module name="Regexp">
|
||||
<property name="format" value="import com\.google\.common\.annotations\.VisibleForTesting"/>
|
||||
<property name="illegalPattern" value="true"/>
|
||||
<property name="message" value="Use Flink's VisibleForTesting instead of Guava's VisibleForTesting"/>
|
||||
</module>
|
||||
<module name="Regexp">
|
||||
<property name="format" value="import static com\.google\.common\.base\.Preconditions"/>
|
||||
<property name="illegalPattern" value="true"/>
|
||||
<property name="message" value="Use Flink's Preconditions instead of Guava's Preconditions"/>
|
||||
</module>
|
||||
<module name="Regexp">
|
||||
<property name="format" value="org\.apache\.commons\.lang\."/>
|
||||
<property name="illegalPattern" value="true"/>
|
||||
<property name="message" value="Use commons-lang3 instead of commons-lang."/>
|
||||
</module>
|
||||
<module name="Regexp">
|
||||
<property name="format" value="org\.codehaus\.jettison"/>
|
||||
<property name="illegalPattern" value="true"/>
|
||||
<property name="message" value="Use com.fasterxml.jackson instead of jettison."/>
|
||||
</module>
|
||||
</module>
|
||||
</module>
|
||||
|
|
Двоичный файл не отображается.
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,5 +1,21 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
|
@ -28,7 +44,7 @@ APP_NAME="Gradle"
|
|||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
@ -66,6 +82,7 @@ esac
|
|||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
|
@ -109,10 +126,11 @@ if $darwin; then
|
|||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
|
@ -138,19 +156,19 @@ if $cygwin ; then
|
|||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
@ -159,14 +177,9 @@ save () {
|
|||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
|
@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
|||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
@ -35,7 +54,7 @@ goto fail
|
|||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
|
@ -45,28 +64,14 @@ echo location of your Java installation.
|
|||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
|
Загрузка…
Ссылка в новой задаче