Skip to content

Commit

Permalink
Test other plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenVinouze committed May 31, 2019
1 parent 15ea0e3 commit ec20110
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 17 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[*]
charset=utf-8
end_of_line=lf
insert_final_newline=false
indent_style=space
indent_size=4
max_line_length=150

21 changes: 13 additions & 8 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,19 @@ has_milestone = github.pr_json["milestone"] != nil
message("This PR does not refer to an existing milestone", sticky: false) unless has_milestone

# Ignore issues out of PR scope
# github.dismiss_out_of_range_messages
github.dismiss_out_of_range_messages({
error: false,
warning: false,
message: true,
markdown: true
})

# Ktlint
checkstyle_dir = "**/reports/ktlint/ktlint*.xml"
Dir[checkstyle_dir].each do |file_name|
checkstyle_reports.inline_comment = true
checkstyle_reports.report file_name
end

# Lint
lint_dir = "**/reports/lint-*.xml"
Expand All @@ -36,13 +48,6 @@ Dir[lint_dir].each do |file_name|
android_lint.lint(inline_mode: true)
end

# Ktlint
checkstyle_dir = "**/reports/ktlint/*-lint.xml"
Dir[checkstyle_dir].each do |file_name|
checkstyle_format.base_path = file_name
checkstyle_format.report file_name
end

# Unit tests
junit_tests_dir = "**/test-results/**/*.xml"
Dir[junit_tests_dir].each do |file_name|
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem 'danger'
gem 'danger-android_lint'
gem "danger-checkstyle_format"
gem "danger-checkstyle_reports"
gem 'danger-junit'
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ buildscript {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath("org.jmailen.gradle:kotlinter-gradle:1.25.2")
classpath "org.jlleitschuh.gradle:ktlint-gradle:8.0.0"
}
}

ext.ReporterType = org.jlleitschuh.gradle.ktlint.reporter.ReporterType

allprojects {
repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.stephenvinouze.advancedrecyclerview.core.views

import androidx.recyclerview.widget.RecyclerView
import android.view.View
import androidx.recyclerview.widget.RecyclerView

/**
* Created by Stephen Vinouze on 04/11/2015.
*/
open class BaseViewHolder(val view: View) : RecyclerView.ViewHolder(view)
open class BaseViewHolder(val view: View) : RecyclerView.ViewHolder(view)
9 changes: 9 additions & 0 deletions ktlint.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apply plugin: "org.jlleitschuh.gradle.ktlint"

ktlint {
version = "0.32.0"
android = true
ignoreFailures = true
enableExperimentalRules = true
reporters = [ReporterType.CHECKSTYLE]
}
2 changes: 1 addition & 1 deletion library.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'org.jmailen.kotlinter'
apply from: '../ktlint.gradle'

group = 'com.github.stephenvinouze'

Expand Down
8 changes: 4 additions & 4 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'org.jmailen.kotlinter'
apply from: '../ktlint.gradle'

android {
compileSdkVersion Integer.parseInt(ANDROID_BUILD_SDK_VERSION)
Expand Down Expand Up @@ -32,11 +32,11 @@ dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

0 comments on commit ec20110

Please sign in to comment.