forked from JetBrains/markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
93 lines (76 loc) · 2 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
buildscript {
ext.kotlin_version = '1.1.50'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7"
}
}
repositories {
flatDir {
dirs 'lib'
}
mavenCentral()
}
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testCompile name: 'idea_rt'
testCompile 'junit:junit:4.12'
}
sourceSets {
main.java.srcDirs = ['src']
main.kotlin.srcDirs = ['src']
test.java.srcDirs = ['test']
test.kotlin.srcDirs = ['test']
main.resources.srcDirs = []
}
test {
useJUnit {
excludeCategories 'org.intellij.markdown.ParserPerformanceTest'
}
testLogging {
exceptionFormat = 'full'
}
outputs.upToDateWhen { false }
}
task performanceTest(type: Test, group: 'verification', dependsOn: [classes, testClasses]) {
useJUnit {
includeCategories 'org.intellij.markdown.ParserPerformanceTest'
}
testLogging {
exceptionFormat = 'full'
}
}
task downloadCommonmark(type: Exec) {
onlyIf { !new File("CommonMark").exists() }
executable 'git'
args 'clone', 'https://github.com/jgm/CommonMark'
}
task testJar(type: Jar) {
from sourceSets.test.output
from sourceSets.main.output
archiveName 'markdown-test.jar'
manifest {
attributes 'Main-Class': 'org.intellij.markdown.SpecRunner'
attributes 'Class-Path': configurations.testRuntime.join(' ')
}
}
task runSpec(type: Exec, group: 'verification', dependsOn: [downloadCommonmark, testJar]) {
executable 'python3'
workingDir 'CommonMark'
args 'test/spec_tests.py', '-p', '../run_html_gen.sh'
}
jar {
archiveName 'markdown.jar'
}
if (hasProperty("bintrayUser")) {
apply from: "deploy.gradle"
}
sourceCompatibility=1.6
targetCompatibility=1.6