4 id 'com.github.hierynomus.license' version '0.14.0'
7 apply plugin: 'maven-publish' // to provide "gradlew publishToMavenLocal"
10 version = '2.1.4-SNAPSHOT' // DO NOT EDIT - THIS IS CHANGED BY THE RELEASE SCRIPT
11 group = 'com.github.dialogos-project'
16 maven { url "https://jitpack.io/" }
21 sourceCompatibility = '1.8'
23 apply plugin: 'license'
24 licenseMain.onlyIf { project.file('LICENSE ').exists() }
25 licenseTest.onlyIf { project.file('LICENSE ').exists() }
28 testCompile group: 'junit', name: 'junit', version: '4.12'
36 mainClassName = 'com.clt.dialogos.DialogOS'
39 systemProperties System.getProperties()
42 def version = '2.1.4-SNAPSHOT' // DO NOT EDIT - THIS IS CHANGED BY THE RELEASE SCRIPT
43 def group = "com.github.dialogos-project"
46 // configuration for maven-publish plugin
49 maven(MavenPublication) {
50 groupId = 'com.github.dialogos-project'
51 artifactId = 'dialogos'
62 "$project.name"(MavenPublication) {
63 groupId = 'com.github.dialogos-project'
64 artifactId = project.name
71 // generate Javadoc for all subprojects and collect them together
72 task allJavadoc(type: Javadoc) {
73 source subprojects.collect { it.sourceSets.main.allJava }
74 classpath = files(subprojects.collect { it.sourceSets.main.compileClasspath })
75 destinationDir = file("${buildDir}/docs/javadoc")
78 // package Javadoc into one Jar file in build/libs
79 task javadocJar(type: Jar, dependsOn: allJavadoc) {
80 classifier = 'javadoc'
81 from javadoc.destinationDir
87 def cleanTask = it.tasks.findByName('clean')
95 task sourcesJar(type: Jar, dependsOn: classes) {
96 classifier = 'sources'
97 from sourceSets.main.allSource
100 // NB This is to declare artifacts for Gradle. To make the artifacts
101 // appear on Jitpack, they also need to be declared in "publishing" above.
108 /****************************************
109 * Collect all submodules and external dependencies into a single build/libs/dialogos-with-dependencies-<VERSION>.jar
110 * https://discuss.gradle.org/t/how-to-get-gradle-install-to-actually-bundle-all-project-subproject-classes-resources-etc/12070/4
111 ****************************************/
113 // This should not interfere with the distribution process, but let's
114 // keep an eye on it. - AK
124 childJars project(it.path)
128 task shadowJar(type:Jar) {
130 attributes 'Implementation-Title': 'DialogOS',
131 'Implementation-Version': version,
132 'Main-Class': mainClassName
135 baseName = 'dialogos-with-dependencies'
137 dependsOn configurations.childJars
138 from { configurations.childJars.collect { zipTree(it) } }