Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #123 from tasomaniac/taso/update-samples
Browse files Browse the repository at this point in the history
Update samples with the latest changes.
  • Loading branch information
rock3r committed Aug 14, 2018
2 parents a7b81bc + e5a7ac6 commit e9fb5ce
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 50 deletions.
14 changes: 8 additions & 6 deletions sample-multi-module/build.gradle
@@ -1,21 +1,22 @@
buildscript {
ext.kotlin_version = '1.2.30'
ext.kotlin_version = '1.2.60'

repositories {
google()
maven { url "https://plugins.gradle.org/m2/" }
gradlePluginPortal()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "gradle.plugin.io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0.RC6-3"
classpath 'com.android.tools.build:gradle:3.1.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'gradle.plugin.io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0.RC8'
classpath 'gradle.plugin.org.jlleitschuh.gradle:ktlint-gradle:5.0.0'
}
}

apply from: "$rootDir/team-props/tasks.gradle"
apply from: rootProject.file('team-props/tasks.gradle')

subprojects { subproject ->
subprojects {

buildscript {
repositories {
Expand All @@ -26,5 +27,6 @@ subprojects { subproject ->
repositories {
google()
mavenCentral()
jcenter()
}
}
Binary file modified sample-multi-module/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions sample-multi-module/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
#Mon Mar 12 18:00:46 GMT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
11 changes: 0 additions & 11 deletions sample-multi-module/team-props/detekt-config.yml
@@ -1,5 +1,4 @@
autoCorrect: true
failFast: false

test-pattern:
active: true
Expand All @@ -19,16 +18,6 @@ test-pattern:
- 'SpreadOperator'
- 'TooManyFunctions'

build:
warningThreshold: 5
failThreshold: 500
maxIssues: 500
weights:
complexity: 2
LongParameterList: 1
style: 1
comments: 1

processors:
active: true

Expand Down
4 changes: 0 additions & 4 deletions sample-multi-module/team-props/findbugs-excludes.xml
Expand Up @@ -9,8 +9,4 @@
</Or>
</Match>

<Match>
<Source name="~.*\.kt" />
</Match>

</FindBugsFilter>
1 change: 0 additions & 1 deletion sample-multi-module/team-props/pmd-rules.xml
Expand Up @@ -5,7 +5,6 @@
<description>Mandatory PMD rules description.</description>

<!--region File exclusions-->
<exclude-pattern>.*\.kt</exclude-pattern>
<exclude-pattern>.*\.R\$.*</exclude-pattern>
<!--endregion-->

Expand Down
6 changes: 5 additions & 1 deletion sample-multi-module/team-props/static-analysis.gradle
@@ -1,5 +1,6 @@
apply plugin: com.novoda.staticanalysis.StaticAnalysisPlugin
apply plugin: 'io.gitlab.arturbosch.detekt'
apply plugin: "org.jlleitschuh.gradle.ktlint"

staticAnalysis {

Expand All @@ -8,7 +9,6 @@ staticAnalysis {
checkstyle {
toolVersion '8.8'
exclude project.fileTree('src/test/java')
exclude '**/*.kt'
configFile rootProject.file('team-props/checkstyle-modules.xml')
includeVariants { variant -> variant.name.contains('debug') }
}
Expand Down Expand Up @@ -41,4 +41,8 @@ staticAnalysis {
output = project.file("build/reports/detekt")
}
}

ktlint {
includeVariants { variant -> variant.name.contains('debug') }
}
}
11 changes: 7 additions & 4 deletions sample/app/build.gradle
@@ -1,5 +1,6 @@
plugins {
id 'io.gitlab.arturbosch.detekt' version '1.0.0.RC6-3'
id 'io.gitlab.arturbosch.detekt' version '1.0.0.RC8'
id "org.jlleitschuh.gradle.ktlint" version "5.0.0"
}

apply plugin: 'com.android.application'
Expand All @@ -9,7 +10,6 @@ apply plugin: com.novoda.staticanalysis.StaticAnalysisPlugin

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
applicationId 'com.novoda.staticanalysis.sample'
Expand All @@ -30,7 +30,7 @@ android {
}

dependencies {
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
}
Expand All @@ -42,7 +42,6 @@ staticAnalysis {
checkstyle {
toolVersion '8.8'
exclude project.fileTree('src/test/java')
exclude '**/*.kt'
configFile rootProject.file('team-props/checkstyle-modules.xml')
includeVariants { variant -> variant.name.contains('debug') }
}
Expand Down Expand Up @@ -76,4 +75,8 @@ staticAnalysis {
}
}

ktlint {
android true
includeVariants { variant -> variant.name.contains('debug') }
}
}
7 changes: 4 additions & 3 deletions sample/build.gradle
@@ -1,13 +1,13 @@
buildscript {
ext.kotlin_version = '1.2.30'
ext.kotlin_version = '1.2.60'

repositories {
google()
maven { url "https://plugins.gradle.org/m2/" }
gradlePluginPortal()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -16,5 +16,6 @@ subprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
Binary file modified sample/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions sample/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
#Mon Mar 12 18:00:46 GMT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
11 changes: 0 additions & 11 deletions sample/team-props/detekt-config.yml
@@ -1,5 +1,4 @@
autoCorrect: true
failFast: false

test-pattern:
active: true
Expand All @@ -19,16 +18,6 @@ test-pattern:
- 'SpreadOperator'
- 'TooManyFunctions'

build:
warningThreshold: 5
failThreshold: 10
maxIssues: 10
weights:
complexity: 2
LongParameterList: 1
style: 1
comments: 1

processors:
active: true

Expand Down
4 changes: 0 additions & 4 deletions sample/team-props/findbugs-excludes.xml
Expand Up @@ -9,8 +9,4 @@
</Or>
</Match>

<Match>
<Source name="~.*\.kt" />
</Match>

</FindBugsFilter>
1 change: 0 additions & 1 deletion sample/team-props/pmd-rules.xml
Expand Up @@ -5,7 +5,6 @@
<description>Mandatory PMD rules description.</description>

<!--region File exclusions-->
<exclude-pattern>.*\.kt</exclude-pattern>
<exclude-pattern>.*\.R\$.*</exclude-pattern>
<!--endregion-->

Expand Down

0 comments on commit e9fb5ce

Please sign in to comment.