language: java
jdk:
  - openjdk8
  - openjdk11
env: NODE_VERSION=8
before_install: nvm install $NODE_VERSION

jobs:
  include:
    - stage: "Shared Module"
      name: "Build"
      script: ./gradlew :shared:build
    - name: "Tests"
      script: ./gradlew :shared:test -i
    - stage: "Language Server"
      name: "Tests"
      script: ./gradlew :server:test -i
    - name: "Executable"
      script: ./gradlew :server:installDist
    - stage: "Editor extensions"
      name: "VSCode"
      script: ./gradlew :editors:vscode:build
    - name: "Atom"
      script: ./gradlew :editors:atom:build

before_deploy:
  - npm install -g vsce atom-package-manager
  - ./gradlew :editors:vscode:packageExtension

deploy:
  - provider: script
    script: cd editors/vscode && vsce publish -p $VSC_TOKEN
    skip_cleanup: true
    on:
      repo: fwcd/kotlin-language-server
      tags: true
      condition: $TRAVIS_OS_NAME = linux
  - provider: script
    script: cd editors/atom && apm publish --tag $(git describe --tags --abbrev=0)
    on:
      repo: fwcd/kotlin-language-server
      tags: true
      condition: $TRAVIS_OS_NAME = linux

language: java
jdk:
  - openjdk8
  - openjdk11
env:
  - NODE_VERSION=10.2.1
  - CXX=g++-4.8
before_install: nvm install $NODE_VERSION

jobs:
  include:
    - stage: "Shared Module"
      name: "Build"
      script: ./gradlew :shared:build
    - name: "Tests"
      script: ./gradlew :shared:test -i
    - stage: "Language Server"
      name: "Tests"
      script: ./gradlew :server:test -i
    - name: "Executable"
      script: ./gradlew :server:installDist
    - stage: "Editor extensions"
      name: "VSCode"
      script: ./gradlew :editors:vscode:build
    - name: "Atom"
      script: ./gradlew :editors:atom:build

addons:
  apt:
    packages:
      - libsecret-1-dev
      - g++-4.8

before_deploy:
  - npm install -g vsce atom-package-manager
  - ./gradlew :editors:vscode:packageExtension

deploy:
  - provider: script
    script: cd editors/vscode && vsce publish -p $VSC_TOKEN
    skip_cleanup: true
    on:
      repo: fwcd/kotlin-language-server
      tags: true
      condition: $TRAVIS_OS_NAME = linux
  - provider: script
    script: cd editors/atom && apm publish --tag $(git describe --tags --abbrev=0)
    on:
      repo: fwcd/kotlin-language-server
      tags: true
      condition: $TRAVIS_OS_NAME = linux

Update Node to 10 and update native dependencies in Travis
Update Node to 10 and update native dependencies in Travis
