Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
- name: Checkout the code
uses: actions/checkout@v3
- name: Run Tests
run: ./gradlew check --stacktrace
run: ./gradlew check --stacktrace -x lintJvm
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3

- name: Run Gradle Lint
run: ./gradlew lintJvm

- name: Upload lint results
uses: actions/upload-artifact@v4
with:
name: lint-results
path: |
plugin/build/reports/lint-results.html
19 changes: 3 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
buildscript {
ext.kotlin_version = '2.2.20'
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
mavenCentral()
}
plugins {
alias libs.plugins.kotlin.jvm apply false
alias libs.plugins.lint apply false
}

tasks.register('clean', Delete) { Delete _ ->
Expand Down
14 changes: 14 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[versions]
kotlin = "2.2.20"
junit = "4.13.2"
publish = "1.3.1"

[plugins]
lint = { id = "com.android.lint", version = "8.12.3"}
gradle-publish = { id = "com.gradle.plugin-publish", version.ref = "publish" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }

[libraries]
androidx-gradleLintChecks = 'androidx.lint:lint-gradle:1.0.0-alpha05'

junit = { module = "junit:junit", version.ref = "junit" }
15 changes: 6 additions & 9 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
plugins {
id "com.gradle.plugin-publish" version "1.3.1"
id "java-gradle-plugin"
}

apply plugin: 'kotlin'

repositories {
mavenCentral()
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.gradle.publish)
alias(libs.plugins.lint)
}

dependencies {
implementation gradleApi()
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

testImplementation 'junit:junit:4.13.2'
lintChecks libs.androidx.gradleLintChecks

testImplementation libs.junit
}

compileKotlin {
Expand Down
15 changes: 15 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
google()
}
}

dependencyResolutionManagement {
repositories {
mavenCentral()
google()
}
}

include ':plugin'