/
build.gradle
100 lines (87 loc) · 2.52 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
}
repositories {
mavenLocal()
maven {
url = 'https://repo.maven.apache.org/maven2'
}
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.5.2'
}
group = 'org.dafny'
version = '4.6.0'
sourceCompatibility = '1.8'
java {
withJavadocJar()
withSourcesJar()
}
sourceSets["main"].java {
srcDir("src/main/dafny-generated")
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs += ['-Xlint:unchecked']
}
test {
useJUnitPlatform()
}
clean {
delete '../../../Binaries/DafnyRuntime.jar'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'DafnyRuntime'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'DafnyRuntime'
description = 'Runtime for Dafny programs compiled to Java'
url = 'https://github.com/dafny-lang/dafny'
licenses {
license {
name = 'MIT License'
url = 'https://spdx.org/licenses/MIT.html'
}
}
developers {
developer {
name = 'The Dafny core team'
email = 'core-team@dafny.org'
}
}
scm {
connection = 'scm:git:https://github.com/dafny-lang/dafny.git'
developerConnection = 'scm:git:git@github.com:dafny-lang/dafny.git'
url = 'https://github.com/dafny-lang/dafny'
}
}
}
}
}
signing {
// Signing is required if building a release version and if we're going to publish it.
// Otherwise, signing will only occur if signatory credentials are configured.
required { gradle.taskGraph.hasTask('publish') }
sign publishing.publications.mavenJava
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}