-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
88 lines (72 loc) · 2.04 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
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.xtext:xtext-gradle-plugin:4.0.0'
}
}
def pomXml = new XmlSlurper().parse('pom.xml')
subprojects {
ext.xtextVersion = '2.35.0'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'org.xtext.xtend'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'signing'
dependencies {
implementation platform("org.eclipse.xtext:xtext-dev-bom:${xtextVersion}")
}
group = 'io.mdsl'
version = pomXml.version
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
configurations.all {
exclude group: 'asm'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
// causes my local build to fail:
signing {
sign configurations.archives
}
publishing {
repositories {
maven {
def releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
def snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
url = "${project.version}".endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.findProperty('ossrhTokenUsername') ?: ""
password = project.findProperty('ossrhTokenPassword') ?: ""
}
}
}
}
// workaround for XText+Gradle build problems: https://github.com/eclipse/xtext/issues/1976#issuecomment-862141814
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.eclipse.platform' && details.requested.name == 'org.eclipse.core.runtime') {
details.useVersion "3.19.0"
}
if (details.requested.group == 'org.eclipse.platform' && details.requested.name == 'org.eclipse.equinox.common') {
details.useVersion("3.13.0")
}
}
}
}
}
configure(subprojects.findAll {it.name != 'mdsl-cli'}) {
apply from: "${rootDir}/gradle/source-layout.gradle"
}