-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
117 lines (98 loc) · 2.74 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id 'java'
id 'groovy'
id 'idea'
id 'maven-publish'
id 'org.jetbrains.kotlin.jvm' version "${kotlinVersion}"
id 'org.jetbrains.intellij' version '1.6.0'
id 'org.cadixdev.licenser' version '0.6.1'
}
group = pluginGroup
version = pluginVersion
java.toolchain.languageVersion = JavaLanguageVersion.of(11)
repositories {
mavenCentral()
maven {
name = 'IntelliJ Dependencies'
url = 'https://cache-redirector.jetbrains.com/intellij-dependencies'
}
}
sourceSets {
dsl
test
}
dependencies {
dslImplementation "org.apache.groovy:groovy:${groovyVersion}"
testImplementation "org.apache.groovy:groovy:${groovyVersion}"
testCompileOnly sourceSets.dsl.output
implementation "org.apache.groovy:groovy:${groovyVersion}"
compileOnly sourceSets.dsl.output
}
tasks.create('testJar', Jar) {
group 'build'
from sourceSets.test.output
classifier 'test'
}
intellij {
pluginName = project.properties.pluginName
type = platformType
version = platformVersion
downloadSources = true
updateSinceUntilBuild = false
plugins = ['java', 'gradle', 'Groovy', 'ByteCodeViewer']
sandboxDir = layout.projectDirectory.dir('.sandbox').toString()
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = '11'
freeCompilerArgs = ['-Xjvm-default=all']
}
}
compileGroovy {
javaLauncher.set(javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(8)
})
}
jar {
from sourceSets.dsl.output
}
tasks.register('dslJar', Jar) {
it.from sourceSets.dsl.output
it.archiveBaseName = 'dsl'
}
tasks.register('dslSources', Jar) {
it.from sourceSets.dsl.allSource
it.archiveBaseName = 'dsl'
it.archiveClassifier = 'sources'
}
license {
header = file('HEADER')
ext {
name = 'EnhancedGroovy'
year = 2022
holder = 'Matyrobbrt'
}
exclude '**/bytecode-utils.kt', '**/class-utils.kt', '**/MemberReference.kt', '**/psi-utils.kt', '**/gradle-util.kt'
}
idea.module.excludeDirs.add(project.file(intellij.sandboxDir.get()))
publishing {
publications {
mavenDsl(MavenPublication) {
groupId = 'com.matyrobbrt.enhancedgroovy'
artifactId = 'dsl'
version = project.version
artifacts = [dslJar, dslSources]
}
}
repositories {
maven {
name = 'ModdingInquisitionMavenRepo'
url = 'https://maven.moddinginquisition.org/releases'
credentials {
username = findProperty('inquisitionMavenUser') ?: ''
password = findProperty('inquisitionMavenPassword') ?: ''
}
}
}
}