Add Circle CI 2.0
ADD
.circleci/config.yml
+version: 2
+jobs:
+ build:
+ working_directory: ~/analytics-android
+ docker:
+ - image: circleci/android:api-26-alpha
+ environment:
+ JVM_OPTS: -Xmx3200m
+ steps:
+ - checkout
+ - restore_cache:
+ key: jars-{{ checksum "build.gradle" }}-{{ checksum "analytics/build.gradle" }}
+ - run:
+ name: Build
+ command: ./gradlew checkFmt build
+ - save_cache:
+ paths:
+ - ~/.gradle
+ key: jars-{{ checksum "build.gradle" }}-{{ checksum "analytics/build.gradle" }}
+ - run:
+ name: Upload code coverage reports
+ command: bash <(curl -s https://codecov.io/bash)
+ - run:
+ name: Deployment
+ command: |
+ if [ "${CIRCLE_BRANCH}" == "master" ]; then
+ .buildscript/deploy_snapshot.sh
+ else
+ echo "==> ignoring non-master branch"
+ fi

MODIFY
analytics/src/main/java/com/segment/analytics/Properties.java
analytics/src/main/java/com/segment/analytics/Properties.java
@@ -282,9 +282,7 @@ public class Properties extends ValueMap {
return putValue(SUBTOTAL_KEY, subtotal);
}
- /**
- * @deprecated use {@link #subtotal()}
- */
+ /** @deprecated use {@link #subtotal()} */
@Deprecated
public double putSubtotal() {
return subtotal();

DELETE
circle.yml
-machine:
- environment:
- CIRCLE_JDK_VERSION: oraclejdk8
- java:
- version: oraclejdk8
-
-dependencies:
- cache_directories:
- - /home/ubuntu/.gradle
- - /home/ubuntu/.m2
- override:
- - echo y | android update sdk --no-ui --all --filter "platform-tools,tools"
- - cp -fR .buildscript/licenses $ANDROID_HOME/licenses
- - TERM=dumb ./gradlew dependencies
-
-test:
- override:
- - TERM=dumb ./gradlew build
- post:
- - mkdir -p $CIRCLE_TEST_REPORTS/junit/
- - find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
- - bash <(curl -s https://codecov.io/bash)
-
-deployment:
- snapshots:
- branch: master
- owner: segmentio
- commands:
- - .buildscript/deploy_snapshot.sh

Add Circle CI 2.0