-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from wordpress-mobile/update-project-apis
Upgrade gradle and project dependencies
- Loading branch information
Showing
11 changed files
with
318 additions
and
212 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/build | ||
lint-report.html | ||
lint-results.txt |
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,53 +1,35 @@ | ||
buildscript { | ||
ext.kotlin_version = '1.3.72' | ||
|
||
repositories { | ||
jcenter() | ||
google() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.5.1' | ||
classpath 'com.novoda:bintray-release:0.9.2' | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
} | ||
} | ||
version = "2.0.0" | ||
|
||
apply plugin: 'java-library' | ||
apply plugin: 'com.novoda.bintray-release' | ||
apply plugin: 'kotlin' | ||
|
||
version = "1.0.2" | ||
def lint_version = "26.3.2" | ||
apply plugin: 'org.jetbrains.kotlin.jvm' | ||
apply plugin: 'com.android.lint' | ||
|
||
repositories { | ||
google() | ||
jcenter() | ||
lint { | ||
htmlReport true | ||
htmlOutput file("lint-report.html") | ||
textReport true | ||
absolutePaths false | ||
ignoreTestSources true | ||
} | ||
|
||
dependencies { | ||
compileOnly "com.android.tools.lint:lint-api:$lint_version" | ||
compileOnly "com.android.tools.lint:lint-checks:$lint_version" | ||
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
testImplementation "com.android.tools.lint:lint:$lint_version" | ||
testImplementation "com.android.tools.lint:lint-tests:$lint_version" | ||
testImplementation "com.android.tools:testutils:$lint_version" | ||
} | ||
compileOnly "com.android.tools.lint:lint-api:$lintVersion" | ||
|
||
jar { | ||
manifest { | ||
attributes("Lint-Registry-v2": "org.wordpress.android.lint.WordPressIssueRegistry") | ||
} | ||
testImplementation "junit:junit:4.13.2" | ||
testImplementation "com.android.tools.lint:lint-tests:$lintVersion" | ||
} | ||
|
||
publish { | ||
artifactId = 'lint' | ||
userOrg = 'wordpress-mobile' | ||
groupId = 'org.wordpress' | ||
uploadName = 'lint' | ||
desc = 'Lint module for WordPress-Android' | ||
publishVersion = project.version | ||
licences = ['GPL-2.0'] | ||
website = 'https://github.com/wordpress-mobile/WordPress-Lint-Android' | ||
dryRun = 'false' | ||
autoPublish = 'true' | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
from components.java | ||
|
||
groupId = 'org.wordpress' | ||
artifactId = 'lint' | ||
version = project.version | ||
} | ||
} | ||
} |
26 changes: 0 additions & 26 deletions
26
WordPressLint/src/main/java/org/wordpress/android/lint/WordPressIssueRegistry.java
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
WordPressLint/src/main/java/org/wordpress/android/lint/WordPressIssueRegistry.kt
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.wordpress.android.lint | ||
|
||
import com.android.tools.lint.client.api.IssueRegistry | ||
import com.android.tools.lint.client.api.Vendor | ||
import com.android.tools.lint.detector.api.CURRENT_API | ||
import org.wordpress.android.lint.WordPressAndroidImportInViewModelDetector.Companion.ISSUE_ANDROID_IMPORT_IN_VIEWMODEL | ||
|
||
class WordPressIssueRegistry : IssueRegistry() { | ||
override val api = CURRENT_API | ||
override val minApi = MIN_API | ||
override val issues get() = listOf( | ||
WordPressRtlCodeDetector.SET_PADDING, | ||
WordPressRtlCodeDetector.SET_MARGIN, | ||
WordPressRtlCodeDetector.GET_PADDING, | ||
ISSUE_ANDROID_IMPORT_IN_VIEWMODEL, | ||
) | ||
override val vendor = Vendor( | ||
vendorName = "WordPress Android", | ||
feedbackUrl = "https://github.com/wordpress-mobile/WordPress-Lint-Android/issues", | ||
identifier = "org.wordpress.android.lint", | ||
) | ||
companion object { | ||
const val MIN_API = 10 | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...Lint/src/main/resources/META-INF/services/com.android.tools.lint.client.api.IssueRegistry
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
org.wordpress.android.lint.WordPressIssueRegistry |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
buildscript { | ||
ext { | ||
kotlinVersion = '1.8.21' | ||
agpVersion = '8.1.0' | ||
lintVersion = '31.1.0' | ||
} | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath "com.android.tools.build:gradle:$agpVersion" | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" | ||
} | ||
|
||
} | ||
|
||
plugins { | ||
id 'maven-publish' | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
} |
Binary file not shown.
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,6 +1,7 @@ | ||
#Thu Feb 22 17:53:41 JST 2018 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip |
Oops, something went wrong.