Update gradle to 3.4.1, pmd to 5.5.5
This commit is contained in:
parent
39c7c1aae3
commit
bb98910e1c
|
@ -53,7 +53,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
pmd {
|
pmd {
|
||||||
toolVersion = '5.5.1'
|
toolVersion = '5.5.5'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -37,13 +37,24 @@ public class LanguageUtilsTest extends TestBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testTransliterateOption() throws Exception {
|
public void testTransliterateOption() throws Exception {
|
||||||
|
setDefaultTransliteration();
|
||||||
assertFalse("Transliteration option fail! Expected 'Off' by default, but result is 'On'", LanguageUtils.transliterate());
|
assertFalse("Transliteration option fail! Expected 'Off' by default, but result is 'On'", LanguageUtils.transliterate());
|
||||||
|
|
||||||
SharedPreferences settings = GBApplication.getPrefs().getPreferences();
|
enableTransliteration(true);
|
||||||
SharedPreferences.Editor editor = settings.edit();
|
|
||||||
editor.putBoolean("transliteration", true);
|
|
||||||
editor.apply();
|
|
||||||
|
|
||||||
assertTrue("Transliteration option fail! Expected 'On', but result is 'Off'", LanguageUtils.transliterate());
|
assertTrue("Transliteration option fail! Expected 'On', but result is 'Off'", LanguageUtils.transliterate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setDefaultTransliteration() {
|
||||||
|
SharedPreferences settings = GBApplication.getPrefs().getPreferences();
|
||||||
|
SharedPreferences.Editor editor = settings.edit();
|
||||||
|
editor.remove("transliteration");
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void enableTransliteration(boolean enable) {
|
||||||
|
SharedPreferences settings = GBApplication.getPrefs().getPreferences();
|
||||||
|
SharedPreferences.Editor editor = settings.edit();
|
||||||
|
editor.putBoolean("transliteration", enable);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
|
||||||
|
|
Loading…
Reference in New Issue