-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
111 lines (96 loc) · 3.1 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
plugins {
id 'java'
id 'maven-publish'
}
group 'com.github.codeborne'
version '1.6-SNAPSHOT'
sourceCompatibility = targetCompatibility = 11
compileJava {
options.compilerArgs.add('--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED')
}
javadoc {
options.addStringOption('-add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED', '-quiet')
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
}
repositories {
mavenCentral()
}
publishing {
publications {
register("SonaType", MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
artifactId = 'jvm2dts'
name = 'jvm2dts'
description = 'Generate Java/Kotlin 11+ classes into TypeScript interfaces and enums'
url = 'https://github.com/codeborne/jvm2dts'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'mmsoomre'
name = 'M. M. Soomre'
email = '[email protected]'
}
}
scm {
connection = "scm:git:git://github.com/codeborne/jvm2dts.git"
developerConnection = 'scm:git:ssh://github.com:codeborne/jvm2dts.git'
url = 'https://github.com/codeborne/jvm2dts/tree/master'
}
}
}
}
repositories {
maven {
name "MavenCentral"
url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username System.getenv("MAVEN_USERNAME")
password System.getenv("MAVEN_PASSWORD")
}
}
maven {
name "MavenCentralArtifact"
url "https://oss.sonatype.org/content/repositories/snapshots"
credentials {
username System.getenv("MAVEN_USERNAME")
password System.getenv("MAVEN_PASSWORD")
}
}
}
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testImplementation 'org.assertj:assertj-core:3.15.0'
testImplementation 'org.jetbrains:annotations:20.1.0'
testImplementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.1'
implementation 'com.beust:jcommander:1.78'
}
test {
useJUnitPlatform()
jvmArgs = ["--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED"]
}
jar {
manifest {
archiveBaseName = 'jvm2dts'
attributes(
'Class-Path': configurations.runtimeClasspath.collect { it.getName() }.join(' '),
'Main-Class': 'jvm2dts.Main'
)
}
}