Skip to content

Instantly share code, notes, and snippets.

View volodia-chornenkyy's full-sized avatar

Volodymyr Chornenkyi volodia-chornenkyy

  • EPAM
  • Ukraine, Lviv
View GitHub Profile
@volodia-chornenkyy
volodia-chornenkyy / detektGrabSubprojectsReports.groovy
Created January 17, 2020 16:27
Gradle task which gathers all Detekt reports from the subprojects and put it in the one folder "$rootDir/reports/detekt". It simplifies CI process a bit.
task detektGrabSubprojectsReports {
group = "Verification"
def detektSingleReportFolder = "$rootDir/reports/detekt"
def detektGeneralFolder = new File(detektSingleReportFolder)
detektGeneralFolder.mkdirs();
subprojects.findAll { subproject ->
def projectReportDir = "$subproject.buildDir/reports"
def detektReportFiles = [
"detekt.xml",
@volodia-chornenkyy
volodia-chornenkyy / OwnPushService.java
Created April 1, 2019 21:23
Handling of multiple FirebaseMessagingService
public class OwnPushService extends FirebaseMessagingService {
private List<FirebaseMessagingService> messagingServices = new ArrayList<>(2);
public GCPushService() {
messagingServices.add(new AirshipFirebaseMessagingService());
messagingServices.add(new TLFirebaseMessagingService());
}
@volodia-chornenkyy
volodia-chornenkyy / StatedNavigationBottomBar
Last active January 22, 2017 14:38
BottomNavigationView which saves state after configuration change
public class StatedNavigationBottomBar extends BottomNavigationView {
public StatedNavigationBottomBar(Context context) {
super(context);
}
public StatedNavigationBottomBar(Context context, AttributeSet attrs) {
super(context, attrs);
}
public StatedNavigationBottomBar(Context context, AttributeSet attrs, int defStyleAttr) {