-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (62 loc) · 1.78 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
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath 'io.jmix.gradle:jmix-gradle-plugin:2.5.0-RC1'
}
}
group = 'gr.netmechanics.jmix'
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'io.jmix'
repositories {
mavenCentral()
maven {
url 'https://nexus.jmix.io/repository/public'
}
}
jmix {
bomVersion = '2.5.0-RC1'
projectId = 'durfld'
}
group = this.group
version = this.version
def props = new Properties()
buildFile.withInputStream { props.load(it) }
def subArchivesBaseName = props.getProperty('archivesBaseName')
def archName = subArchivesBaseName.substring(1, subArchivesBaseName.length() - 1)
java {
withSourcesJar()
}
artifacts {
archives sourcesJar
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/" + System.getenv("GITHUB_REPOSITORY"))
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
publications {
javaMaven(MavenPublication) {
artifactId = archName
from components.java
}
}
}
// remove after https://youtrack.jetbrains.com/issue/IDEA-227215 is fixed
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.compilerArgs.add("-parameters")
}
}