Do clean release build to exclude Jacoco from jar.
@@ -7,14 +7,16 @@ PROJECT_DIR="$DIR"
pushd "$PROJECT_DIR"
+# Export "PUBLISH_RELEASE=true" to initiate release process.
+if [ "$PUBLISH_RELEASE" != "true" ]; then
+ echo "Running non-release build...".
+
# For some reason test for annotation processor are failing on a regular CI setup.
# So we had to exclude test task for it from the main build process and execute it as a separate command.
./gradlew clean build checkstyle -PdisablePreDex --exclude-task :storio-sqlite-annotations-processor-test:test --exclude-task :storio-content-resolver-annotations-processor-test:test
./gradlew :storio-sqlite-annotations-processor-test:test
./gradlew :storio-content-resolver-annotations-processor-test:test
-
-# Export "PUBLISH_RELEASE=true" to initiate release process.
-if [ "$PUBLISH_RELEASE" == "true" ]; then
+else
echo "Launching release publishing process..."
if [ -z "$GPG_SECRET_KEYS" ]; then
@@ -30,5 +32,5 @@ if [ "$PUBLISH_RELEASE" == "true" ]; then
echo $GPG_SECRET_KEYS | base64 --decode | gpg --import;
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust;
- ./gradlew uploadArchives closeAndReleaseRepository --info
+ ./gradlew clean uploadArchives closeAndReleaseRepository --info
fi
