forked from deplant/java4ever-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
149 lines (125 loc) · 3.95 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
plugins {
id "java-library"
id "maven-publish"
id "signing"
}
// Global variables for all modules
//ext {
// dependencies
//}
group v_groupId
version v_version
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
main {
java {
srcDirs = ['src/main/java', 'src/gen/java']
}
}
}
dependencies {
// RUNTIME **************************
api "tech.deplant.java4ever:java4ever-binding:$v_version" // java4ever-binding
api "tech.deplant.java4ever:java4ever-utils:$v_version" // java4ever-utils
implementation "org.slf4j:slf4j-jdk-platform-logging:$slf4jVersion" // SLF4J Bridge to JDK9 System.Logger
// TESTS **************************
// SLF4J (Simple provider for tests)
testImplementation "org.slf4j:slf4j-simple:$slf4jVersion"
// JUnit 5
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/" + v_repository)
credentials {
username = System.getenv("USERNAME")
password = System.getenv("GH_PACKAGES_UPLOAD_TOKEN")
}
}
maven {
name = "Sonatype"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
publications {
framework(MavenPublication) {
groupId = v_groupId
artifactId = v_artifactId
version = v_version
from components.java
pom {
name = v_artifactId
description = 'Development framework for Everscale DApp development'
url = "https://github.com/" + v_repository
// properties = [
// myProp : "value",
// "prop.with.dots": "anotherValue"
// ]
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = v_developerId
name = v_developerName
email = v_developerEmail
organization = v_org
organizationUrl = v_url
}
}
scm {
connection = "scm:git:git://github.com/" + v_repository + ".git"
developerConnection = "scm:git:ssh://github.com/" + v_repository + ".git"
url = "http://github.com/" + v_repository
}
}
}
}
}
signing {
sign publishing.publications.framework
}
javadoc {
options.addBooleanOption('html5', true)
options.addBooleanOption('-enable-preview', true)
options.addStringOption('-release', '19')
}
java {
withJavadocJar()
withSourcesJar()
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}
test {
useJUnitPlatform()
jvmArgs += "--enable-preview"
jvmArgs += "--add-modules=jdk.incubator.concurrent"
jvmArgs += "--enable-native-access=java4ever.binding"
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += "--enable-preview"
options.compilerArgs += "--add-modules=jdk.incubator.concurrent"
}
tasks.withType(JavaExec).configureEach {
jvmArgs += "--enable-preview"
jvmArgs += "--add-modules=jdk.incubator.concurrent"
}
tasks.withType(Test) {
jvmArgs += "--enable-preview"
jvmArgs += "--add-modules=jdk.incubator.concurrent"
}