-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
126 lines (109 loc) · 3.05 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
plugins {
id 'idea'
id 'java-library'
id 'antlr'
id 'signing'
id 'maven-publish'
}
group = 'ru.rofleksey.refl'
version = '0.0.6'
repositories {
mavenCentral()
}
dependencies {
antlr "org.antlr:antlr4:4.13.0"
implementation "org.antlr:antlr4-runtime:4.13.0"
implementation 'org.apache.commons:commons-text:1.10.0'
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
generateGrammarSource {
doFirst {
new File("${projectDir}/src/generated/java/ru/rofleksey/refl".toString()).mkdirs()
}
maxHeapSize = "64m"
outputDirectory = file("${projectDir}/src/generated/java")
arguments += ["-lib",
"${projectDir}/src/generated/java/ru/rofleksey/refl".toString(),
"-visitor",
"-long-messages",
"-package", "ru.rofleksey.refl"]
}
clean {
delete file("${projectDir}/src/generated")
}
sourceSets {
generated {
java.srcDir "${projectDir}/src/generated/java/"
}
main {
java.srcDirs += "${projectDir}/src/generated/java/"
}
}
idea {
module {
sourceDirs += file("${projectDir}/src/generated/java")
generatedSourceDirs += file("${projectDir}/src/generated/java")
}
}
java {
withJavadocJar()
withSourcesJar()
}
sourcesJar.configure {
dependsOn("generateGrammarSource")
}
javadoc.configure {
dependsOn("generateGrammarSource")
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'refl'
from components.java
pom {
name = 'Refl'
description = 'Simple embeddable scripting language for Java and Android'
url = 'https://github.com/rofleksey/refl'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/license/mit/'
}
}
developers {
developer {
id = 'rofleksey'
name = 'Alex Borisov'
email = 'evilmorty@yandex.ru'
}
}
scm {
connection = 'scm:git:git://github.com/rofleksey/refl.git'
developerConnection = 'scm:git:ssh://github.com/rofleksey/refl.git'
url = 'https://github.com/rofleksey/refl'
}
}
}
}
repositories {
maven {
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.properties["ossrhUsername"].toString()
password = project.properties["ossrhPassword"].toString()
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
test {
useJUnitPlatform()
}