From 7124cbcacd52a697c70ddc8c7a645be7cd160756 Mon Sep 17 00:00:00 2001 From: aminecmi Date: Tue, 27 Sep 2022 16:53:18 +0200 Subject: [PATCH] Fixed issue with drone failing silently. Analyzation is now detached. --- .drone.yml | 21 +++++++++++++------ .../android/LoginActivity.kt | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2703761..5b6cf10 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,24 +3,33 @@ type: docker name: test steps: - - name: AnylyseBuildTest + - name: Anylyse image: mingc/android-build-box:latest failure: ignore + detach: true commands: - echo "---------------------------------------------------------" - echo "Analysing..." - ./gradlew sonarqube -Dsonar.projectKey=RFS2 -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" - echo "---------------------------------------------------------" - - echo "Building..." - - ./gradlew :androidApp:build -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" -P pushCache=false - - echo "---------------------------------------------------------" - - echo "Testing..." - - echo "---------------------------------------------------------" environment: SONAR_HOST_URL: from_secret: sonarScannerHostUrl SONAR_LOGIN: from_secret: sonarScannerLogin + - name: BuildAndTest + image: mingc/android-build-box:latest + commands: + - echo "Building..." + - ./gradlew :androidApp:build -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" -P pushCache=false + - echo "---------------------------------------------------------" + - echo "Testing..." + - echo "---------------------------------------------------------" + environment: + SONAR_HOST_URL: + from_secret: sonarScannerHostUrl + SONAR_LOGIN: + from_secret: sonarScannerLogin trigger: event: - push diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt index 880b3d1..bd17f42 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt @@ -38,7 +38,7 @@ class LoginActivity : AppCompatActivity(), DIAware { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO) + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM) binding = ActivityLoginBinding.inflate(layoutInflater) val view = binding.root