-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
129 lines (102 loc) · 2.87 KB
/
build.gradle
File metadata and controls
129 lines (102 loc) · 2.87 KB
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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.standardout:gradle-eclipseconfig:1.1.0'
}
}
defaultTasks 'clean', 'install'
def srcProjects() {
subprojects.findAll { new File(it.projectDir, "src").exists() }
}
def javaProjects() {
subprojects.findAll { new File(it.projectDir, "src/main/java").exists() }
}
def groovyProjects() {
subprojects.findAll { new File(it.projectDir, "src/main/groovy").exists() }
}
configure(srcProjects()) { project ->
// common settings
apply plugin: 'maven-publish'
apply plugin: 'org.standardout.eclipseconfig'
group = 'to.wetransform.hale-codegen'
version = '0.3.0-SNAPSHOT'
eclipseconfig {
codeTemplates = rootProject.file('codetemplates.xml')
}
repositories {
maven {
url 'https://repo.osgeo.org/repository/release/'
}
mavenCentral()
// hale»studio artifacts
maven {
url 'https://artifactory.wetransform.to/artifactory/libs-release'
}
}
configurations.all {
// ensure SNAPSHOTs are updated every time if needed
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
project.ext {
haleVersion = '5.0.1'
haleResourcesVersion = '2022.8.16'
}
}
configure(javaProjects()) {
// common settings for Java projects
apply plugin: 'java'
// package javadoc into a jar file
task packageJavadoc(type: Jar, dependsOn: 'javadoc') {
from javadoc.destinationDir
archiveClassifier = 'javadoc'
}
}
configure(groovyProjects()) {
// common settings for Groovy projects
apply plugin: 'groovy'
// package groovydoc into a jar file
task packageJavadoc(type: Jar, dependsOn: 'groovydoc') {
from groovydoc.destinationDir
archiveClassifier = 'javadoc'
}
}
configure(srcProjects()) { project ->
// further common configuration (needs java/groovy config)
// package source into a jar file
task packageSources(type: Jar) {
from sourceSets.main.allSource
archiveClassifier = 'sources'
}
// define artifacts for upload
artifacts {
archives jar
archives packageJavadoc
archives packageSources
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact packageSources
artifact packageJavadoc
}
}
repositories {
maven {
// upload to wetransform artifactory
def releasesRepoUrl = 'https://artifactory.wetransform.to/artifactory/libs-release-local'
def snapshotsRepoUrl = 'https://artifactory.wetransform.to/artifactory/libs-snapshot-local'
url project.hasProperty('release') ? releasesRepoUrl : snapshotsRepoUrl
credentials {
username = project.hasProperty('wetfArtifactoryUser') ? wetfArtifactoryUser : ''
password = project.hasProperty('wetfArtifactoryPassword') ? wetfArtifactoryPassword : ''
}
}
}
}
}
wrapper {
gradleVersion = '7.6.1'
}