Merge pull request #3441 from ByteHamster/circleci-improvements
Circleci improvements
This commit is contained in:
commit
a92123340d
|
@ -1,7 +1,7 @@
|
|||
version: 2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
test:
|
||||
docker:
|
||||
- image: circleci/android:api-28
|
||||
|
||||
|
@ -21,11 +21,24 @@ jobs:
|
|||
- v1-android-
|
||||
|
||||
- run:
|
||||
# To build release, we need to create a temporary keystore that can be used to sign the app
|
||||
command: |
|
||||
keytool -noprompt -genkey -v -keystore "app/keystore" -alias alias -storepass password -keypass password -keyalg RSA -validity 10 -dname "CN=antennapod.org, OU=dummy, O=dummy, L=dummy, S=dummy, C=US"
|
||||
./gradlew assembleRelease :core:testPlayReleaseUnitTest :app:assemblePlayDebugAndroidTest -PdisablePreDex
|
||||
no_output_timeout: 1800
|
||||
name: Create temporary release keystore
|
||||
command: keytool -noprompt -genkey -v -keystore "app/keystore" -alias alias -storepass password -keypass password -keyalg RSA -validity 10 -dname "CN=antennapod.org, OU=dummy, O=dummy, L=dummy, S=dummy, C=US"
|
||||
|
||||
- run:
|
||||
name: Build debug
|
||||
command: ./gradlew assembleDebug -PdisablePreDex
|
||||
|
||||
- run:
|
||||
name: Build release
|
||||
command: ./gradlew assembleRelease -PdisablePreDex
|
||||
|
||||
- run:
|
||||
name: Execute unit tests
|
||||
command: ./gradlew :core:testPlayReleaseUnitTest -PdisablePreDex
|
||||
|
||||
- run:
|
||||
name: Build integration tests
|
||||
command: ./gradlew :app:assemblePlayDebugAndroidTest -PdisablePreDex
|
||||
|
||||
- store_artifacts:
|
||||
path: app/build/outputs/apk
|
||||
|
@ -37,3 +50,26 @@ jobs:
|
|||
- ~/.gradle
|
||||
- ~/android
|
||||
key: v1-android-{{ checksum "build.gradle" }}
|
||||
|
||||
checkstyle:
|
||||
docker:
|
||||
- image: circleci/android:api-28
|
||||
working_directory: ~/AntennaPod
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run:
|
||||
name: Checkstyle
|
||||
command: ./gradlew checkstyle
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
|
||||
test:
|
||||
jobs:
|
||||
- test
|
||||
|
||||
checkstyle:
|
||||
jobs:
|
||||
- checkstyle
|
||||
|
|
|
@ -638,7 +638,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
|
|||
}
|
||||
}
|
||||
|
||||
static public void showSkipPreference(Activity activity, SkipDirection direction) {
|
||||
public static void showSkipPreference(Activity activity, SkipDirection direction) {
|
||||
int checked = 0;
|
||||
int skipSecs = direction.getPrefSkipSeconds();
|
||||
final int[] values = activity.getResources().getIntArray(R.array.seek_delta_values);
|
||||
|
|
|
@ -20,12 +20,12 @@ public abstract class ItemActionButton {
|
|||
}
|
||||
|
||||
@StringRes
|
||||
abstract public int getLabel();
|
||||
public abstract int getLabel();
|
||||
|
||||
@AttrRes
|
||||
abstract public int getDrawable();
|
||||
public abstract int getDrawable();
|
||||
|
||||
abstract public void onClick(Context context);
|
||||
public abstract void onClick(Context context);
|
||||
|
||||
public int getVisibility() {
|
||||
return View.VISIBLE;
|
||||
|
|
|
@ -9,7 +9,7 @@ import de.danoeh.antennapod.adapter.DataFolderAdapter;
|
|||
|
||||
public class ChooseDataFolderDialog {
|
||||
|
||||
public static abstract class RunnableWithString implements Runnable {
|
||||
public abstract static class RunnableWithString implements Runnable {
|
||||
public RunnableWithString() {
|
||||
super();
|
||||
}
|
||||
|
|
|
@ -639,7 +639,7 @@ public class QueueFragment extends Fragment {
|
|||
/ playbackSpeed);
|
||||
}
|
||||
}
|
||||
info += " \u2022 ";
|
||||
info += " • ";
|
||||
info += getString(R.string.time_left_label);
|
||||
info += Converter.getDurationStringLocalized(getActivity(), timeLeft);
|
||||
}
|
||||
|
|
11
build.gradle
11
build.gradle
|
@ -82,3 +82,14 @@ wrapper {
|
|||
def doFreeBuild() {
|
||||
return hasProperty("freeBuild")
|
||||
}
|
||||
|
||||
apply plugin: "checkstyle"
|
||||
checkstyle {
|
||||
toolVersion '8.24'
|
||||
}
|
||||
|
||||
task checkstyle(type: Checkstyle) {
|
||||
classpath = files()
|
||||
source "${project.rootDir}"
|
||||
exclude("**/gen/**")
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||
<module name = "Checker">
|
||||
<property name="charset" value="UTF-8"/>
|
||||
|
||||
<property name="severity" value="error"/>
|
||||
|
||||
<property name="fileExtensions" value="java, xml"/>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<module name="AvoidEscapedUnicodeCharacters">
|
||||
<property name="allowEscapesForControlCharacters" value="true"/>
|
||||
<property name="allowByTailComment" value="true"/>
|
||||
<property name="allowNonPrintableEscapes" value="true"/>
|
||||
</module>
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Package name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
</module>
|
||||
</module>
|
|
@ -21,8 +21,12 @@ import de.danoeh.antennapod.core.service.download.AntennapodHttpClient;
|
|||
import de.danoeh.antennapod.core.service.download.HttpDownloader;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.util.NetworkUtils;
|
||||
import okhttp3.*;
|
||||
import okhttp3.internal.http.RealResponseBody;
|
||||
import okhttp3.Interceptor;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Protocol;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
import okhttp3.ResponseBody;
|
||||
|
||||
/**
|
||||
* @see com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader
|
||||
|
|
|
@ -1076,7 +1076,7 @@ public class DownloadService extends Service {
|
|||
private static String compileNotificationString(List<Downloader> downloads) {
|
||||
List<String> lines = new ArrayList<>(downloads.size());
|
||||
for (Downloader downloader : downloads) {
|
||||
StringBuilder line = new StringBuilder("\u2022 ");
|
||||
StringBuilder line = new StringBuilder("• ");
|
||||
DownloadRequest request = downloader.getDownloadRequest();
|
||||
switch (request.getFeedfileType()) {
|
||||
case Feed.FEEDFILETYPE_FEED:
|
||||
|
|
Loading…
Reference in New Issue