import java.nio.file.Paths /* * Copyright 2018 dorkbox, llc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ buildscript { // load properties from custom location def propsFile = Paths.get("${projectDir}/../../gradle.properties").toAbsolutePath().normalize().toFile() println("Loading custom property data from: ${propsFile}") def props = new Properties() propsFile.withInputStream {props.load(it)} props.each {key, val -> project.ext.set(key, val)} // for license sources repositories { maven {url "https://plugins.gradle.org/m2/"} } dependencies { classpath "gradle.plugin.com.dorkbox:Licensing:1.2.1" classpath "gradle.plugin.com.dorkbox:Licensing:1.2.1:sources" } } plugins { id 'java' id 'java-gradle-plugin' id 'maven-publish' id 'signing' id "org.jetbrains.kotlin.jvm" version "1.2.51" // close and release on sonatype id 'io.codearte.nexus-staging' version '0.11.0' } apply plugin: "com.dorkbox.Licensing" project.description = 'Java Semantic Versioning following semver.org' project.group = 'com.dorkbox' project.version = '1.0.0' project.ext.name = 'Semantic Versioning' project.ext.id = 'SemanticVersioning' project.ext.url = 'https://git.dorkbox.com/dorkbox/SemanticVersioning' sourceCompatibility = 1.6 targetCompatibility = 1.6 licensing { license(License.MIT) { author 'dorkbox, llc' author 'G. Richard Bellamy' author 'Kenduck' author 'Larry Bordowitz ' author 'Martin Rüegg ' author 'Zafar Khaja ' url project.ext.url note project.description } } tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } repositories { jcenter() } dependencies { testCompile group: 'junit', name: 'junit', version:'4.12' } sourceSets { main { java { setSrcDirs Collections.singletonList('src') } resources { setSrcDirs Collections.singletonList('resources') srcDirs '.' include 'LICENSE*' include 'META-INF/*.*' } } test { java { setSrcDirs Collections.singletonList('test') } } }