forked from JetBrains/intellij-platform-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·155 lines (133 loc) · 4.9 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
plugins {
id 'com.gradle.plugin-publish' version '0.10.0'
id 'synapticloop.documentr' version '1.3.4'
id 'java-gradle-plugin'
id 'maven'
}
apply plugin: 'groovy'
apply plugin: 'java-gradle-plugin'
sourceCompatibility = 1.7
targetCompatibility = 1.7
plugins.withType(JavaPlugin) {
project.tasks.withType(GroovyCompile) { task ->
task.sourceCompatibility = project.sourceCompatibility
task.targetCompatibility = project.targetCompatibility
}
}
repositories {
maven { url 'https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-plugin-service' }
maven { url 'https://cache-redirector.jetbrains.com/repo1.maven.org/maven2' }
maven { url 'https://cache-redirector.jetbrains.com/jcenter.bintray.com' }
}
dependencies {
compile localGroovy()
compile gradleApi()
compile 'org.jetbrains:annotations:13.0'
compile 'org.jetbrains.intellij:plugin-repository-rest-client:0.4.30'
compile 'org.jetbrains.intellij.plugins:structure-base:3.45'
compile 'org.jetbrains.intellij.plugins:structure-intellij:3.45'
compile 'de.undercouch:gradle-download-task:3.4.2'
testCompile gradleTestKit()
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4', {
exclude module: 'groovy-all'
}
testCompile 'junit:junit:4.12'
}
version = '0.3.12'
group = 'org.jetbrains.intellij.plugins'
description = """
This plugin allows you to build plugins for IntelliJ platform using specific IntelliJ SDK and bundled plugins.
The plugin adds extra IntelliJ-specific dependencies, patches processResources tasks to fill some tags
(name, version) in `plugin.xml` with appropriate values, patches compile tasks to instrument code with
nullability assertions and forms classes made with IntelliJ GUI Designer and provides some build steps which might be
helpful while developing plugins for IntelliJ platform.
"""
pluginBundle {
website = 'https://github.com/JetBrains/gradle-intellij-plugin'
vcsUrl = 'https://github.com/JetBrains/gradle-intellij-plugin'
description = 'Plugin for building plugins for IntelliJ IDEs'
tags = ['intellij', 'jetbrains', 'idea']
//noinspection GroovyAssignabilityCheck
plugins {
intellijPlugin {
id = 'org.jetbrains.intellij'
displayName = 'Gradle IntelliJ Plugin'
}
}
}
task cacheIntolerantTest(type: Test) {
configureTests(it)
include '**/DownloadIntelliJSpec.class'
filter.failOnNoMatchingTests = false
}
test {
configureTests(it)
exclude '**/DownloadIntelliJSpec.class'
dependsOn cacheIntolerantTest
}
def configureTests(testTask) {
def testGradleHomePath = "$buildDir/testGradleHome"
testTask.doFirst {
new File(testGradleHomePath).mkdir()
}
testTask.systemProperties['test.gradle.home'] = testGradleHomePath
testTask.systemProperties['plugins.repo'] = pluginsRepo
testTask.outputs.dir(testGradleHomePath)
try {
if (InetAddress.getByName("jetbrains-com-mirror.labs.intellij.net").isReachable(300)) {
testTask.systemProperties['jbre.repo'] = 'http://repo.labs.intellij.net/intellij-jdk'
}
}
catch (UnknownHostException ignore) {
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
uploadArchives {
repositories {
mavenDeployer {
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
artifactId project.name
name 'Gradle IntelliJ Plugin'
description project.description
version "$snapshotVersion-SNAPSHOT"
url 'https://github.com/JetBrains/gradle-intellij-plugin'
packaging 'jar'
scm {
connection 'scm:git:https://github.com/JetBrains/gradle-intellij-plugin/'
developerConnection 'scm:git:https://github.com/JetBrains/gradle-intellij-plugin/'
url 'https://github.com/JetBrains/gradle-intellij-plugin/'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'zolotov'
name 'Alexander Zolotov'
email 'zolotov@jetbrains.com'
}
}
}
}
}
}
wrapper {
gradleVersion = '4.10'
distributionUrl = "https://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
}