-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
77 lines (66 loc) · 2.02 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
group = "io.intrepid"
version = "2.0.0-alpha1"
val pluginId = "io.intrepid.static-analysis"
plugins {
java
kotlin("jvm") version "1.3.11"
`kotlin-dsl`
id("com.gradle.plugin-publish") version "0.9.7"
`maven-publish`
`java-gradle-plugin`
}
buildscript {
repositories {
mavenCentral()
maven(url = "https://plugins.gradle.org/m2/")
}
dependencies {
classpath("org.gradle.api.plugins:gradle-nexus-plugin:0.3")
}
}
repositories {
google()
jcenter()
mavenLocal()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
dependencies {
implementation(gradleApi())
implementation("com.android.tools.build:gradle:3.3.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.11")
}
// Use java-gradle-plugin to generate plugin descriptors and specify plugin ids
gradlePlugin {
plugins {
create("staticAnalysis") {
id = pluginId
implementationClass = "io.intrepid.analysis.StaticAnalysis"
}
}
}
// Publishes to the public gradle plugins repo. ONLY RUN THIS WHEN RELEASING `./gradlew publishPlugins`
pluginBundle {
website = "https://github.com/IntrepidPursuits/static-analysis-gradle-plugin"
vcsUrl = "https://github.com/IntrepidPursuits/static-analysis-gradle-plugin"
description = "Adds gradle tasks for running PMD and FindBugs, and includes a default configuration that is common to most Intrepid projects."
tags = listOf("lint", "pmd", "findbugs", "analysis", "inspection", "android")
(plugins) {
create("staticAnalysis") {
id = pluginId
displayName = "Android Static Analysis Plugin"
}
}
}
// mainly for local publishing for development/testing. i.e `./gradlew publishToMavenLocal`
publishing {
publications {
create<MavenPublication>("maven") {
groupId = rootProject.group as String
artifactId = project.name
version = rootProject.version as String
from(components["java"])
}
}
}