Permalink
Browse files

Fix build

  • Loading branch information...
ouattararomuald committed Dec 30, 2018
1 parent 213aa0b commit 6e0c4aa6421e999d1187662f3077879fdd75203d
@@ -0,0 +1,26 @@
#!/bin/bash
#
# Deploy a jar, source jar, and javadoc jar to Sonatype's snapshot repo.
#
# Adapted from https://coderwall.com/p/9b_lfq and
# http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/

SLUG="ouattararomuald/syndication"
JDK="oraclejdk8"
BRANCH="master"

set -e

if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then
echo "Skipping snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'."
elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then
echo "Skipping snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'."
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo "Skipping snapshot deployment: was pull request."
elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then
echo "Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'."
else
echo "Deploying snapshot..."
./gradlew uploadArchives
echo "Snapshot deployed!"
fi
@@ -3,6 +3,12 @@ language: java
jdk:
- oraclejdk8

script:
- ./gradlew clean check

after_success:
- .buildscript/deploy_snapshot.sh

branches:
except:
- gh-pages
@@ -2,25 +2,22 @@ buildscript {

ext.versions = [
'kotlin': '1.3.11',
'junit': '5.2.0',
'moshi': '1.8.0',
'okhttp': '3.12.0',
'retrofit': '2.5.0',
]

ext.deps = [
'okhttp': "com.squareup.okhttp3:okhttp:${versions.okhttp}",
'retrofit': [
'coroutines': 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2',
'simplexml': "com.squareup.retrofit2:converter-simplexml:${versions.retrofit}",
],
'coroutine': 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0',
'kotlin': [
'stdlib': 'org.jetbrains.kotlin:kotlin-stdlib:1.3.11'
'stdlib': 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.11'
],
'mockWebServer': "com.squareup.okhttp3:mockwebserver:${versions.okhttp}",
'junit': [
'api': 'org.junit.jupiter:junit-jupiter-api:5.2.0',
'engine': 'org.junit.jupiter:junit-jupiter-engine:5.2.0',
'api': "org.junit.jupiter:junit-jupiter-api:${versions.junit}",
'engine': "org.junit.jupiter:junit-jupiter-engine:${versions.junit}",
],
'simpleXml': 'org.simpleframework:simple-xml:2.7.1',
'truth': 'com.google.truth:truth:0.42'
@@ -35,11 +32,21 @@ buildscript {
}
}

allprojects {
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}

subprojects {
repositories {
mavenCentral()
}

tasks.withType(Javadoc).all { enabled = false } // FIXME: build fails without this.

group = GROUP
version = VERSION_NAME
}
Binary file not shown.
@@ -4,6 +4,13 @@ test {
useJUnitPlatform()
}

sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
main.java.srcDirs += 'src/main/java'
test.kotlin.srcDirs += 'src/test/kotlin'
test.java.srcDirs += 'src/test/java'
}

dependencies {
implementation deps.kotlin.stdlib
implementation project(':syndication-feed')
@@ -5,6 +5,13 @@ test {
useJUnitPlatform()
}

sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
main.java.srcDirs += 'src/main/kotlin'
test.kotlin.srcDirs += 'src/test/kotlin'
test.java.srcDirs += 'src/test/kotlin'
}

dependencies {
implementation deps.kotlin.stdlib

@@ -5,6 +5,13 @@ test {
useJUnitPlatform()
}

sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
main.java.srcDirs += 'src/main/kotlin'
test.kotlin.srcDirs += 'src/test/kotlin'
test.java.srcDirs += 'src/test/kotlin'
}

dependencies {
implementation deps.kotlin.stdlib
api project(':syndication-feed')
@@ -23,4 +30,4 @@ compileTestKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
}

apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')

0 comments on commit 6e0c4aa

Please sign in to comment.