diff --git a/.travis.yml b/.travis.yml index 635c230aa3..2ce6eec1c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,9 @@ script: # Build app (assembleGplayRelease assembleFdroidRelease) # Build Android test (assembleAndroidTest) (disabled for now) # Code quality (lintGplayRelease lintFdroidRelease) - - ./gradlew clean assembleGplayRelease assembleFdroidRelease lintGplayRelease lintFdroidRelease --stacktrace + # Split into two steps because if a task contain Fdroid, PlayService will be disabled + - ./gradlew clean assembleGplayRelease lintGplayRelease --stacktrace + - ./gradlew clean assembleFdroidRelease lintFdroidRelease --stacktrace # Run unitary test (Disable for now, see https://travis-ci.org/vector-im/riot-android/builds/502504370) # - ./gradlew testGplayReleaseUnitTest --stacktrace # Other code quality check diff --git a/tools/check/check_code_quality.sh b/tools/check/check_code_quality.sh index 55d782da9d..75a02357c9 100755 --- a/tools/check/check_code_quality.sh +++ b/tools/check/check_code_quality.sh @@ -105,7 +105,8 @@ fi echo echo "Search for long files..." -${checkLongFilesScript} 2000 \ +# TODO Reduce this once VectorSettingsPreferencesFragment.kt has been reworked +${checkLongFilesScript} 3500 \ ./vector/src/main/java \ ./vector/src/main/res/layout \ ./vector/src/main/res/values \ diff --git a/vector/build.gradle b/vector/build.gradle index be66c06da4..8bb46c068d 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -203,6 +203,6 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' } -if (!getGradle().getStartParameter().getTaskRequests().toString().contains("fdroid")) { +if (!getGradle().getStartParameter().getTaskRequests().toString().contains("Fdroid")) { apply plugin: 'com.google.gms.google-services' } diff --git a/vector/src/fdroid/AndroidManifest.xml b/vector/src/fdroid/AndroidManifest.xml index 01babce90a..0cc39d63e8 100644 --- a/vector/src/fdroid/AndroidManifest.xml +++ b/vector/src/fdroid/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="im.vector.riotredesign"> diff --git a/vector/src/fdroid/java/im/vector/push/fcm/FcmHelper.java b/vector/src/fdroid/java/im/vector/riotredesign/push/fcm/FcmHelper.java similarity index 97% rename from vector/src/fdroid/java/im/vector/push/fcm/FcmHelper.java rename to vector/src/fdroid/java/im/vector/riotredesign/push/fcm/FcmHelper.java index ba8badef83..82f2df9aca 100755 --- a/vector/src/fdroid/java/im/vector/push/fcm/FcmHelper.java +++ b/vector/src/fdroid/java/im/vector/riotredesign/push/fcm/FcmHelper.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package im.vector.push.fcm; +package im.vector.riotredesign.push.fcm; import android.app.Activity; import android.content.Context; diff --git a/vector/src/fdroid/java/im/vector/push/fcm/NotificationTroubleshootTestManagerFactory.kt b/vector/src/fdroid/java/im/vector/riotredesign/push/fcm/NotificationTroubleshootTestManagerFactory.kt similarity index 87% rename from vector/src/fdroid/java/im/vector/push/fcm/NotificationTroubleshootTestManagerFactory.kt rename to vector/src/fdroid/java/im/vector/riotredesign/push/fcm/NotificationTroubleshootTestManagerFactory.kt index 5a81c79d3b..5663603b8f 100644 --- a/vector/src/fdroid/java/im/vector/push/fcm/NotificationTroubleshootTestManagerFactory.kt +++ b/vector/src/fdroid/java/im/vector/riotredesign/push/fcm/NotificationTroubleshootTestManagerFactory.kt @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package im.vector.push.fcm +package im.vector.riotredesign.push.fcm import androidx.fragment.app.Fragment import im.vector.fragments.troubleshoot.TestAccountSettings -import im.vector.fragments.troubleshoot.TestDeviceSettings import im.vector.matrix.android.api.session.Session -import im.vector.push.fcm.troubleshoot.TestAutoStartBoot -import im.vector.push.fcm.troubleshoot.TestBackgroundRestrictions import im.vector.riotredesign.features.settings.troubleshoot.NotificationTroubleshootTestManager import im.vector.riotredesign.features.settings.troubleshoot.TestBingRulesSettings +import im.vector.riotredesign.features.settings.troubleshoot.TestDeviceSettings import im.vector.riotredesign.features.settings.troubleshoot.TestSystemSettings +import im.vector.riotredesign.push.fcm.troubleshoot.TestAutoStartBoot +import im.vector.riotredesign.push.fcm.troubleshoot.TestBackgroundRestrictions class NotificationTroubleshootTestManagerFactory { diff --git a/vector/src/fdroid/java/im/vector/push/fcm/troubleshoot/TestAutoStartBoot.kt b/vector/src/fdroid/java/im/vector/riotredesign/push/fcm/troubleshoot/TestAutoStartBoot.kt similarity index 96% rename from vector/src/fdroid/java/im/vector/push/fcm/troubleshoot/TestAutoStartBoot.kt rename to vector/src/fdroid/java/im/vector/riotredesign/push/fcm/troubleshoot/TestAutoStartBoot.kt index 4e33423629..bd266448d6 100644 --- a/vector/src/fdroid/java/im/vector/push/fcm/troubleshoot/TestAutoStartBoot.kt +++ b/vector/src/fdroid/java/im/vector/riotredesign/push/fcm/troubleshoot/TestAutoStartBoot.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package im.vector.push.fcm.troubleshoot +package im.vector.riotredesign.push.fcm.troubleshoot import androidx.fragment.app.Fragment import im.vector.riotredesign.R diff --git a/vector/src/fdroid/java/im/vector/push/fcm/troubleshoot/TestBackgroundRestrictions.kt b/vector/src/fdroid/java/im/vector/riotredesign/push/fcm/troubleshoot/TestBackgroundRestrictions.kt similarity index 98% rename from vector/src/fdroid/java/im/vector/push/fcm/troubleshoot/TestBackgroundRestrictions.kt rename to vector/src/fdroid/java/im/vector/riotredesign/push/fcm/troubleshoot/TestBackgroundRestrictions.kt index 1ad298c60d..d5903b92ff 100644 --- a/vector/src/fdroid/java/im/vector/push/fcm/troubleshoot/TestBackgroundRestrictions.kt +++ b/vector/src/fdroid/java/im/vector/riotredesign/push/fcm/troubleshoot/TestBackgroundRestrictions.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package im.vector.push.fcm.troubleshoot +package im.vector.riotredesign.push.fcm.troubleshoot import android.content.Context import android.net.ConnectivityManager diff --git a/vector/src/fdroid/java/im/vector/push/fcm/troubleshoot/TestBatteryOptimization.kt b/vector/src/fdroid/java/im/vector/riotredesign/push/fcm/troubleshoot/TestBatteryOptimization.kt similarity index 97% rename from vector/src/fdroid/java/im/vector/push/fcm/troubleshoot/TestBatteryOptimization.kt rename to vector/src/fdroid/java/im/vector/riotredesign/push/fcm/troubleshoot/TestBatteryOptimization.kt index c7d6001853..ad1529e844 100644 --- a/vector/src/fdroid/java/im/vector/push/fcm/troubleshoot/TestBatteryOptimization.kt +++ b/vector/src/fdroid/java/im/vector/riotredesign/push/fcm/troubleshoot/TestBatteryOptimization.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package im.vector.push.fcm.troubleshoot +package im.vector.riotredesign.push.fcm.troubleshoot import androidx.fragment.app.Fragment import im.vector.riotredesign.R diff --git a/vector/src/fdroid/java/im/vector/receiver/OnApplicationUpgradeReceiver.java b/vector/src/fdroid/java/im/vector/riotredesign/receiver/OnApplicationUpgradeReceiver.java similarity index 96% rename from vector/src/fdroid/java/im/vector/receiver/OnApplicationUpgradeReceiver.java rename to vector/src/fdroid/java/im/vector/riotredesign/receiver/OnApplicationUpgradeReceiver.java index a90ca6b1ad..062357276f 100644 --- a/vector/src/fdroid/java/im/vector/receiver/OnApplicationUpgradeReceiver.java +++ b/vector/src/fdroid/java/im/vector/riotredesign/receiver/OnApplicationUpgradeReceiver.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package im.vector.receiver; +package im.vector.riotredesign.receiver; import android.content.BroadcastReceiver; import android.content.Context; diff --git a/vector/src/gplay/AndroidManifest.xml b/vector/src/gplay/AndroidManifest.xml index e48db66767..145da025c7 100755 --- a/vector/src/gplay/AndroidManifest.xml +++ b/vector/src/gplay/AndroidManifest.xml @@ -1,5 +1,6 @@ - + @@ -8,7 +9,7 @@ android:name="firebase_analytics_collection_deactivated" android:value="true" /> - + diff --git a/vector/src/gplay/java/im/vector/push/fcm/FcmHelper.java b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/FcmHelper.java similarity index 99% rename from vector/src/gplay/java/im/vector/push/fcm/FcmHelper.java rename to vector/src/gplay/java/im/vector/riotredesign/push/fcm/FcmHelper.java index ff5ed9449a..00fff7dd93 100755 --- a/vector/src/gplay/java/im/vector/push/fcm/FcmHelper.java +++ b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/FcmHelper.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package im.vector.push.fcm; +package im.vector.riotredesign.push.fcm; import android.app.Activity; import android.content.Context; diff --git a/vector/src/gplay/java/im/vector/push/fcm/NotificationTroubleshootTestManagerFactory.kt b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/NotificationTroubleshootTestManagerFactory.kt similarity index 88% rename from vector/src/gplay/java/im/vector/push/fcm/NotificationTroubleshootTestManagerFactory.kt rename to vector/src/gplay/java/im/vector/riotredesign/push/fcm/NotificationTroubleshootTestManagerFactory.kt index be03c08ea1..d306fa194e 100644 --- a/vector/src/gplay/java/im/vector/push/fcm/NotificationTroubleshootTestManagerFactory.kt +++ b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/NotificationTroubleshootTestManagerFactory.kt @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package im.vector.push.fcm +package im.vector.riotredesign.push.fcm import androidx.fragment.app.Fragment import im.vector.fragments.troubleshoot.TestAccountSettings import im.vector.matrix.android.api.session.Session -import im.vector.push.fcm.troubleshoot.TestFirebaseToken -import im.vector.push.fcm.troubleshoot.TestPlayServices -import im.vector.push.fcm.troubleshoot.TestTokenRegistration +import im.vector.riotredesign.push.fcm.troubleshoot.TestFirebaseToken +import im.vector.riotredesign.push.fcm.troubleshoot.TestPlayServices +import im.vector.riotredesign.push.fcm.troubleshoot.TestTokenRegistration import im.vector.riotredesign.features.settings.troubleshoot.NotificationTroubleshootTestManager import im.vector.riotredesign.features.settings.troubleshoot.TestBingRulesSettings import im.vector.riotredesign.features.settings.troubleshoot.TestDeviceSettings diff --git a/vector/src/gplay/java/im/vector/push/fcm/VectorFirebaseMessagingService.kt b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/VectorFirebaseMessagingService.kt similarity index 99% rename from vector/src/gplay/java/im/vector/push/fcm/VectorFirebaseMessagingService.kt rename to vector/src/gplay/java/im/vector/riotredesign/push/fcm/VectorFirebaseMessagingService.kt index 1c74d09798..79fc538f41 100755 --- a/vector/src/gplay/java/im/vector/push/fcm/VectorFirebaseMessagingService.kt +++ b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/VectorFirebaseMessagingService.kt @@ -17,7 +17,7 @@ * limitations under the License. */ -package im.vector.push.fcm +package im.vector.riotredesign.push.fcm import android.os.Handler import android.os.Looper diff --git a/vector/src/gplay/java/im/vector/push/fcm/troubleshoot/TestFirebaseToken.kt b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/troubleshoot/TestFirebaseToken.kt similarity index 98% rename from vector/src/gplay/java/im/vector/push/fcm/troubleshoot/TestFirebaseToken.kt rename to vector/src/gplay/java/im/vector/riotredesign/push/fcm/troubleshoot/TestFirebaseToken.kt index 7b3d9be404..6ab552dadf 100644 --- a/vector/src/gplay/java/im/vector/push/fcm/troubleshoot/TestFirebaseToken.kt +++ b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/troubleshoot/TestFirebaseToken.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package im.vector.push.fcm.troubleshoot +package im.vector.riotredesign.push.fcm.troubleshoot import androidx.fragment.app.Fragment import com.google.firebase.iid.FirebaseInstanceId diff --git a/vector/src/gplay/java/im/vector/push/fcm/troubleshoot/TestPlayServices.kt b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/troubleshoot/TestPlayServices.kt similarity index 97% rename from vector/src/gplay/java/im/vector/push/fcm/troubleshoot/TestPlayServices.kt rename to vector/src/gplay/java/im/vector/riotredesign/push/fcm/troubleshoot/TestPlayServices.kt index a5f93f4f8c..5d56712b39 100644 --- a/vector/src/gplay/java/im/vector/push/fcm/troubleshoot/TestPlayServices.kt +++ b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/troubleshoot/TestPlayServices.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package im.vector.push.fcm.troubleshoot +package im.vector.riotredesign.push.fcm.troubleshoot import androidx.fragment.app.Fragment import com.google.android.gms.common.ConnectionResult diff --git a/vector/src/gplay/java/im/vector/push/fcm/troubleshoot/TestTokenRegistration.kt b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/troubleshoot/TestTokenRegistration.kt similarity index 97% rename from vector/src/gplay/java/im/vector/push/fcm/troubleshoot/TestTokenRegistration.kt rename to vector/src/gplay/java/im/vector/riotredesign/push/fcm/troubleshoot/TestTokenRegistration.kt index 38b7375a71..7a8c319ed6 100644 --- a/vector/src/gplay/java/im/vector/push/fcm/troubleshoot/TestTokenRegistration.kt +++ b/vector/src/gplay/java/im/vector/riotredesign/push/fcm/troubleshoot/TestTokenRegistration.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package im.vector.push.fcm.troubleshoot +package im.vector.riotredesign.push.fcm.troubleshoot import androidx.fragment.app.Fragment import im.vector.riotredesign.R diff --git a/vector/src/main/java/im/vector/riotredesign/core/services/EventStreamServiceX.kt b/vector/src/main/java/im/vector/riotredesign/core/services/EventStreamServiceX.kt index 306063297e..a7cf7f3e42 100644 --- a/vector/src/main/java/im/vector/riotredesign/core/services/EventStreamServiceX.kt +++ b/vector/src/main/java/im/vector/riotredesign/core/services/EventStreamServiceX.kt @@ -122,8 +122,7 @@ class EventStreamServiceX : VectorService() { } } } - } - */ + } */ /** * Service internal state diff --git a/vector/src/main/java/im/vector/riotredesign/features/notifications/NotifiableEventResolver.kt b/vector/src/main/java/im/vector/riotredesign/features/notifications/NotifiableEventResolver.kt index 83860d232d..ef269a798a 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/notifications/NotifiableEventResolver.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/notifications/NotifiableEventResolver.kt @@ -182,7 +182,6 @@ class NotifiableEventResolver(val context: Context) { //TODO generic handling? } return null - } - */ + } */ } diff --git a/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt index 20cecdf8f5..20078dbc2f 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt @@ -49,8 +49,7 @@ class VectorSettingsAdvancedNotificationPreferenceFragment : VectorPreferenceFra refreshPreferences() refreshDisplay() } - } - */ + } */ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { // define the layout diff --git a/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsNotificationsTroubleshootFragment.kt b/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsNotificationsTroubleshootFragment.kt index c7ca4a656d..8c6b3cef25 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsNotificationsTroubleshootFragment.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsNotificationsTroubleshootFragment.kt @@ -29,7 +29,7 @@ import androidx.recyclerview.widget.RecyclerView import androidx.transition.TransitionManager import butterknife.BindView import im.vector.matrix.android.api.session.Session -import im.vector.push.fcm.NotificationTroubleshootTestManagerFactory +import im.vector.riotredesign.push.fcm.NotificationTroubleshootTestManagerFactory import im.vector.riotredesign.R import im.vector.riotredesign.core.extensions.withArgs import im.vector.riotredesign.core.platform.RiotActivity diff --git a/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsPreferencesFragment.kt b/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsPreferencesFragment.kt index 0c096233f7..fc214faf13 100755 --- a/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsPreferencesFragment.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsPreferencesFragment.kt @@ -1867,8 +1867,7 @@ class VectorSettingsPreferencesFragment : VectorPreferenceFragment(), SharedPref } .show() } - } - */ + } */ //============================================================================================================== // Phone number management @@ -1950,8 +1949,7 @@ class VectorSettingsPreferencesFragment : VectorPreferenceFragment(), SharedPref } addPhoneBtn.order = order - } - */ + } */ } //==============================================================================================================