commit
018a8231d6
@ -8,6 +8,7 @@ test:
|
||||
- cd ..
|
||||
- ./gradlew build
|
||||
- ./gradlew checkstyle
|
||||
- ./gradlew pmd
|
||||
- echo no | android create avd --force -n fcl-test -t android-10 -b armeabi
|
||||
- emulator -force-32bit -avd fcl-test -no-skin -no-audio -no-window &
|
||||
- ./tools/wait-for-emulator
|
||||
|
@ -1,6 +1,7 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'witness'
|
||||
apply plugin: 'checkstyle'
|
||||
apply plugin: 'pmd'
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
@ -203,11 +204,29 @@ task checkstyle(type: Checkstyle) {
|
||||
configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
|
||||
source 'src', 'test/src'
|
||||
include '**/*.java'
|
||||
exclude '**/gen/**'
|
||||
|
||||
classpath = files()
|
||||
}
|
||||
|
||||
pmd {
|
||||
toolVersion = '5.4.1'
|
||||
consoleOutput = true
|
||||
}
|
||||
|
||||
task pmd(type: Pmd, dependsOn: assembleDebug) {
|
||||
ruleSets = [
|
||||
//'java-basic',
|
||||
//'java-unusedcode',
|
||||
'java-android',
|
||||
'java-clone',
|
||||
'java-finalizers',
|
||||
'java-imports',
|
||||
'java-migrating',
|
||||
]
|
||||
source 'src'
|
||||
include '**/org/fdroid/**/*.java'
|
||||
}
|
||||
|
||||
// This person took the example code below from another blogpost online, however
|
||||
// I lost the reference to it:
|
||||
// http://stackoverflow.com/questions/23297562/gradle-javadoc-and-android-documentation
|
||||
|
@ -176,6 +176,7 @@ public class FDroidApp extends Application {
|
||||
@TargetApi(9)
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
if (Build.VERSION.SDK_INT >= 9 && BuildConfig.DEBUG) {
|
||||
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
|
||||
.detectAll()
|
||||
@ -187,7 +188,6 @@ public class FDroidApp extends Application {
|
||||
.build());
|
||||
}
|
||||
updateLanguage();
|
||||
super.onCreate();
|
||||
ACRA.init(this);
|
||||
|
||||
// Needs to be setup before anything else tries to access it.
|
||||
|
@ -595,12 +595,12 @@ public class SwapService extends Service {
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
Utils.debugLog(TAG, "Destroying service, will disable swapping if required, and unregister listeners.");
|
||||
disableAllSwapping();
|
||||
Preferences.get().unregisterLocalRepoHttpsListeners(httpsEnabledListener);
|
||||
LocalBroadcastManager.getInstance(this).unregisterReceiver(onWifiChange);
|
||||
LocalBroadcastManager.getInstance(this).unregisterReceiver(receiveSwapStatusChanged);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
private Notification createNotification() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user