-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
160 lines (141 loc) · 5.62 KB
/
build.gradle
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
import io.freefair.gradle.plugins.okhttp.tasks.UploadFile
plugins {
id "com.gradle.plugin-publish" version "1.3.0"
id "io.freefair.git-version"
id "io.freefair.lombok"
id "io.freefair.javadoc-links"
}
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
def freefairGradleVersion = "8.11"
def agpVersion = "8.7.2"
group = 'io.freefair.gradle'
description = "FreeFair Android Gradle Plugins"
tasks.withType(Javadoc).configureEach {
options.addBooleanOption("Xdoclint:-missing", true)
options.links "https://docs.gradle.org/$gradle.gradleVersion/javadoc/"
options.links "https://developer.android.com/reference/tools/gradle-api/8.7/"
options.links "https://docs.freefair.io/gradle-plugins/$freefairGradleVersion/api"
}
jar {
manifest {
attributes 'Implementation-Version': "$project.version"
}
}
java {
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
test.useJUnitPlatform()
dependencies {
api "com.android.tools.build:gradle-api:$agpVersion"
runtimeOnly "com.android.tools.build:gradle:$agpVersion"
api "io.freefair.gradle:lombok-plugin:$freefairGradleVersion"
api "io.freefair.gradle:aspectj-plugin:$freefairGradleVersion"
testImplementation platform("org.junit:junit-bom:5.11.2")
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-params'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
gradlePlugin {
website = "https://docs.freefair.io/android-gradle-plugins/$version/"
vcsUrl = 'https://github.com/freefair/android-gradle-plugins'
plugins {
androidJavadoc {
id = "io.freefair.android-javadoc"
implementationClass = "io.freefair.gradle.plugins.android.AndroidJavadocPlugin"
displayName = "Android Javadoc Plugin"
description = "Generate javadocs for all variants of your android project"
tags.set(['android'])
}
androidLombok {
id = "io.freefair.android-lombok"
implementationClass = "io.freefair.gradle.plugins.android.lombok.AndroidLombokPlugin"
displayName = "Android Lombok Plugin"
description = "Automatic Lombok and Delombok configuration for your android project"
tags.set(['android'])
}
androidCi {
id = "io.freefair.android-ci"
implementationClass = "io.freefair.gradle.plugins.android.ci.CiPlugin"
displayName = "Android CI Plugin"
description = "Properly configure your android project on CI servers (like travis)"
tags.set(['android'])
}
androidCiLint {
id = "io.freefair.android-ci-lint"
implementationClass = "io.freefair.gradle.plugins.android.ci.CiLintPlugin"
displayName = "Android CI Plugin"
description = "Properly configure your android project on CI servers (like travis)"
tags.set(['android'])
}
androidAspectjPostCompileWeaving {
id = "io.freefair.android.aspectj.post-compile-weaving"
implementationClass = "io.freefair.gradle.plugins.android.aspectj.AndroidAspectJPostCompileWeavingPlugin"
displayName = "Android AspectJ Post-Compile Weaving Plugin"
description = "Android AspectJ Post-Compile Weaving Plugin"
tags.set(['android'])
}
}
}
plugins.withId("maven-publish") {
project.apply plugin: 'io.freefair.maven-central.validate-poms'
publishing {
publications.withType(MavenPublication).configureEach {
pom {
url = 'https://github.com/freefair/android-gradle-plugins'
name = provider { project.description }
description = provider { project.description }
inceptionYear = '2016'
licenses {
license {
name = 'MIT'
url = 'https://github.com/freefair/android-gradle-plugins/blob/master/LICENSE'
}
}
organization {
name = 'FreeFair'
url = 'https://github.com/freefair'
}
developers {
developer {
id = 'larsgrefer'
name = 'Lars Grefer'
email = 'github@larsgrefer.de'
timezone = 'Europe/Berlin'
}
}
ciManagement {
system = 'GitHub Actions'
url = 'https://github.com/freefair/android-gradle-plugins/actions'
}
issueManagement {
system = 'GitHub Issues'
url = 'https://github.com/freefair/android-gradle-plugins/issues'
}
scm {
connection = 'scm:git:https://github.com/freefair/android-gradle-plugins.git'
developerConnection = 'scm:git:git@github.com:freefair/android-gradle-plugins.git'
url = 'https://github.com/freefair/android-gradle-plugins/'
}
}
}
}
}
tasks.register('uploadDocumentation', UploadFile) {
dependsOn "javadocJar"
username = "user"
password = findProperty('freefairDocsPass')
file = javadocJar.archiveFile
url = "https://docs.freefair.io/api/$project.version?path=android-gradle-plugins"
}
tasks.named('wrapper') {
distributionType = Wrapper.DistributionType.ALL
}