diff --git a/.circleci/config.yml b/.circleci/config.yml index eea3b0525..bc4b90d2d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,7 +63,7 @@ jobs: - v1-dependencies- - run: sudo chmod a+x packages/openchs-android/android/gradlew - run: sudo npm i -g react-native-cli - - run: make deps_ci release_no_env_universal_without_clean + - run: make deps_ci disable_gradle_daemon release_no_env_universal_without_clean - save_cache: key: v1-dependencies-{{ checksum "packages/openchs-android/android/app/build.gradle" }}-generic paths: @@ -97,7 +97,7 @@ jobs: - v1-dependencies- - run: sudo chmod a+x packages/openchs-android/android/gradlew - run: sudo npm i -g react-native-cli - - run: make deps_ci release_staging_dev_without_clean + - run: make deps_ci disable_gradle_daemon release_staging_dev_without_clean - run: make deploy_platform_translations_staging - save_cache: key: v1-dependencies-{{ checksum "packages/openchs-android/android/app/build.gradle" }}-staging @@ -132,7 +132,7 @@ jobs: - v1-dependencies- - run: sudo chmod a+x packages/openchs-android/android/gradlew - run: sudo npm i -g react-native-cli - - run: make deps_ci release_gramin_staging_dev_without_clean + - run: make deps_ci disable_gradle_daemon release_gramin_staging_dev_without_clean - run: make deploy_platform_translations_gramin_staging - save_cache: key: v1-dependencies-{{ checksum "packages/openchs-android/android/app/build.gradle" }}-staging @@ -170,14 +170,14 @@ jobs: - aws-cli/setup: role_arn: 'arn:aws:iam::118388513628:role/CircleCI-OIDC' region: 'ap-south-1' - - run: make deps_ci release_prerelease_dev_without_clean + - run: make deps_ci disable_gradle_daemon release_prerelease_dev_without_clean - aws-s3/copy: from: packages/openchs-android/android/app/build/outputs/apk/<< pipeline.parameters.flavor >>/release/app-<< pipeline.parameters.flavor >>-release.apk to: s3://samanvay/openchs/<< pipeline.number >>-<< pipeline.git.revision >>/prerelease_dev/ - store_artifacts: path: packages/openchs-android/android/app/build/outputs/apk/<< pipeline.parameters.flavor >>/release/app-<< pipeline.parameters.flavor >>-release.apk destination: << pipeline.parameters.flavor >>-prerelease_dev-<< pipeline.git.revision >>.apk - - run: make deps_ci release_prerelease_without_clean + - run: make deps_ci disable_gradle_daemon release_prerelease_without_clean - aws-s3/copy: from: packages/openchs-android/android/app/build/outputs/apk/<< pipeline.parameters.flavor >>/release/app-<< pipeline.parameters.flavor >>-release.apk to: s3://samanvay/openchs/<< pipeline.number >>-<< pipeline.git.revision >>/prerelease/ @@ -215,7 +215,7 @@ jobs: - v1-dependencies- - run: sudo chmod a+x packages/openchs-android/android/gradlew - run: sudo npm i -g react-native-cli - - run: make deps_ci release_perf_without_clean + - run: make deps_ci disable_gradle_daemon release_perf_without_clean - run: make deploy_platform_translations_prerelease - save_cache: key: v1-dependencies-{{ checksum "packages/openchs-android/android/app/build.gradle" }}-perf diff --git a/Makefile b/Makefile index d6533a059..d67bf94ff 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,16 @@ renew_env: clean_all deps deps: build_env apply_patch deps_ci: build_env_ci apply_patch +kill_gradle_daemons: + -pkill -f '.*GradleDaemon.*' + # Kill all previous gradle daemons irrespective of version to release memory used + +disable_gradle_daemon: + sed -i -e 's/org.gradle.daemon=true/org.gradle.daemon=false/' packages/openchs-android/android/gradle.properties + +enable_gradle_daemon: + sed -i -e 's/org.gradle.daemon=false/org.gradle.daemon=true/' packages/openchs-android/android/gradle.properties + ignore_deps_changes: git checkout package-lock.json # @@ -368,7 +378,7 @@ build: build_env build_app build_env_ci: export NODE_OPTIONS=--max_old_space_size=2048 cd packages/openchs-android && npm install --legacy-peer-deps -# export GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.workers.max=4 -Xms1024m -Xmx4096M -XX:MaxMetaspaceSize=2g" +# export GRADLE_OPTS="-Dorg.gradle.daemon=false -Dkotlin.compiler.execution.strategy=in-process -Dorg.gradle.workers.max=4 -Xms1024m -Xmx4096M -XX:MaxMetaspaceSize=2g" # GRADLE_OPTS set via circleci env vars ui #