diff --git a/build.gradle b/build.gradle index 82c091920..e0a6768e5 100644 --- a/build.gradle +++ b/build.gradle @@ -2,8 +2,12 @@ apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'maven' apply plugin: 'nexus' +apply plugin: 'signing' group = "org.encog" +archivesBaseName = "encog" +version = "3.4" + buildscript { repositories { @@ -39,6 +43,70 @@ task createWrapper(type: Wrapper) { gradleVersion = '2.10' } +task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc +} + +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} + +artifacts { + archives javadocJar, sourcesJar +} + +signing { + sign configurations.archives +} + +uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } + + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } + + pom.project { + name 'Example Application' + packaging 'jar' + artifactId 'encog-core' // optionally artifactId can be defined here + description 'Encog Machine Learning Framework.' + url 'http://www.heatonresearch.com/encog/' + + scm { + connection 'https://github.com/encog/encog-java-core' + developerConnection 'git@github.com:encog/encog-java-core.git' + url 'http://code.google.com/p/encog-java/source/browse/' + + } + + licenses { + license { + name 'The Apache License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + + developers { + developer { + id 'jeffheatondotcom' + name 'Jeff Heaton' + email 'jheaton@heatonresearch.com' + } + } + } + } + } +} + task getVersion << { println '3.4.0' }