1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- plugins {
- id 'com.dmdirc.git-version' version '1.0'
- id 'com.github.kt3k.coveralls' version '2.6.3'
- }
-
- group = 'com.dmdirc'
-
- apply plugin: 'java'
- apply plugin: 'maven-publish'
- apply plugin: 'jacoco'
- apply plugin: 'idea'
-
- idea {
- module {
- sourceDirs += file('src/main/generated')
- testSourceDirs += file('src/test/generated_tests')
- generatedSourceDirs = [file('src/main/generated'), file('src/test/generated_tests')]
- }
- }
-
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
-
- repositories.mavenCentral()
-
- dependencies {
- compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
- compile group: 'com.google.auto.value', name: 'auto-value', version: '1.6'
- compile group: 'com.google.auto.value', name: 'auto-value-annotations', version: '1.6'
- compile group: 'com.google.guava', name:'guava', version: '19.0'
-
- testCompile group: 'junit', name: 'junit', version: '4.12'
- testCompile group: 'org.mockito', name: 'mockito-core', version: '2.2.7'
- testCompile group: 'com.google.jimfs', name: 'jimfs', version: '1.1'
- }
-
- // DMDirc uses 19.0, JimFS has a transient dep on 16.0.1 - force the newer version
- configurations.all {
- resolutionStrategy.force('com.google.guava:guava:19.0')
- }
-
- publishing {
- publications {
- mavenJava(MavenPublication) {
- from components.java
-
- artifact sourcesJar { classifier 'sources' }
- artifact javadocJar { classifier 'javadoc' }
- }
- }
- repositories {
- maven {
- name 'snapshots'
- url 'http://artifactory.dmdirc.com/artifactory/snapshots'
- credentials {
- username System.getenv('ARTIFACTORY_USER')
- password System.getenv('ARTIFACTORY_PASSWORD')
- }
- }
- }
- }
-
- task wrapper(type: Wrapper) {
- gradleVersion = '3.1'
- }
-
- task publishSnapshot(dependsOn: 'publishMavenJavaPublicationToSnapshotsRepository') << {
- }
-
- jacocoTestReport {
- reports {
- xml.enabled = true // coveralls plugin depends on xml format report
- html.enabled = true
- }
- }
-
- task javadocJar(type: Jar) {
- classifier = 'javadoc'
- from javadoc
- }
-
- task sourcesJar(type: Jar) {
- classifier = 'sources'
- from sourceSets.main.allSource
- }
|