This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathbuild.gradle
78 lines (69 loc) · 2.54 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
plugins {
// dependency versions (task: dependencyUpdates)
// https://github.com/ben-manes/gradle-versions-plugin
id 'com.github.ben-manes.versions' version "$versionsPluginVersion"
// maven publish plugin
id 'maven-publish'
// nexus publish plugin
id 'io.github.gradle-nexus.publish-plugin' version "$nexusPublishPluginVersion"
}
allprojects {
version = project.properties['releaseVersion'] ?: 'SNAPSHOT'
group = 'org.libelektra'
ext {
isReleaseVersion = !project.version.contains("SNAPSHOT")
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
username = project.properties['sonatypeUsername'] ?: 'SONATYPE_USER_NAME_NOT_CONFIGURED'
password = project.properties['sonatypePassword'] ?: 'SONATYPE_USER_PASSWORD_NOT_CONFIGURED'
}
}
}
// apply optional version information override
File versionSettings = new File(rootProject.projectDir, 'version-settings.gradle')
if (versionSettings.exists()) {
apply from: versionSettings
}
// log task graph
gradle.taskGraph.whenReady { taskGraph ->
logger.lifecycle("Building Elektra Java bindings version: ${rootProject.version}")
logger.lifecycle("Is release version: ${rootProject.isReleaseVersion}")
logger.lifecycle("Found task graph: $taskGraph")
logger.lifecycle("Found ${taskGraph.allTasks.size()} tasks.")
taskGraph.allTasks.forEach { task ->
logger.lifecycle("$task")
task.dependsOn.forEach { dep ->
logger.lifecycle(" - $dep")
}
// task.inputs.files.each { input ->
// logger.lifecycle(" IF $input")
// }
// task.inputs.properties.each { input ->
// logger.lifecycle(" IP $input")
// }
// task.outputs.files.each { output ->
// logger.lifecycle(" OF $output")
// }
}
if (rootProject.version == 'undefined' || rootProject.version == '0.9.4-1') {
throw new RuntimeException("Version '${rootProject.version}' is blacklisted. see https://issues.sonatype.org/browse/OSSRH-66930")
}
}
task printSourceFiles {
doLast {
allprojects.forEach { project ->
if (project.hasProperty("sourceSets")) {
project.sourceSets.each {
it.allSource.each {
println(it)
}
}
}
}
}
}