diff --git a/app/build.gradle b/app/build.gradle index ad388bd0257..38848709205 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,6 @@ import org.apache.tools.ant.filters.ReplaceTokens apply plugin: "com.android.application" -apply plugin: "me.tatarka.retrolambda" apply plugin: 'com.github.triplet.play' apply plugin: 'com.getkeepsafe.dexcount' @@ -113,10 +112,13 @@ android { additionalParameters "--no-version-vectors" } + flavorDimensions "market" productFlavors { free { + dimension "market" } play { + dimension "market" } } @@ -126,58 +128,58 @@ android { } configurations { - freeDebugCompile - freeReleaseCompile - playDebugCompile - playReleaseCompile + freeDebugImplementation + freeReleaseImplementation + playDebugImplementation + playReleaseImplementation } dependencies { - freeDebugCompile project(path: ":core", configuration: "freeDebug") - freeReleaseCompile project(path: ":core", configuration: "freeRelease") + freeImplementation project(":core") // free build hack: skip some dependencies if (!doFreeBuild()) { - playDebugCompile project(path: ":core", configuration: "playDebug") - playReleaseCompile project(path: ":core", configuration: "playRelease") + playImplementation project(":core") } else { System.out.println("app: free build hack, skipping some dependencies") } - compile "com.android.support:support-v4:$supportVersion" - compile "com.android.support:appcompat-v7:$supportVersion" - compile "com.android.support:design:$supportVersion" - compile "com.android.support:gridlayout-v7:$supportVersion" - compile "com.android.support:percent:$supportVersion" - compile "com.android.support:recyclerview-v7:$supportVersion" - compile "org.apache.commons:commons-lang3:$commonslangVersion" - compile("org.shredzone.flattr4j:flattr4j-core:$flattr4jVersion") { + implementation "com.android.support:support-v4:$supportVersion" + implementation "com.android.support:appcompat-v7:$supportVersion" + implementation "com.android.support:design:$supportVersion" + implementation "com.android.support:gridlayout-v7:$supportVersion" + implementation "com.android.support:percent:$supportVersion" + implementation "com.android.support:recyclerview-v7:$supportVersion" + implementation "org.apache.commons:commons-lang3:$commonslangVersion" + implementation("org.shredzone.flattr4j:flattr4j-core:$flattr4jVersion") { exclude group: "org.json", module: "json" } - compile "commons-io:commons-io:$commonsioVersion" - compile "org.jsoup:jsoup:$jsoupVersion" - compile "com.github.bumptech.glide:glide:$glideVersion" - compile "com.squareup.okhttp3:okhttp:$okhttpVersion" - compile "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion" - compile "com.squareup.okio:okio:$okioVersion" - compile "de.greenrobot:eventbus:$eventbusVersion" - compile "io.reactivex:rxandroid:$rxAndroidVersion" - compile "io.reactivex:rxjava:$rxJavaVersion" + implementation "commons-io:commons-io:$commonsioVersion" + implementation "org.jsoup:jsoup:$jsoupVersion" + implementation "com.github.bumptech.glide:glide:$glideVersion" + implementation "com.squareup.okhttp3:okhttp:$okhttpVersion" + implementation "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion" + implementation "com.squareup.okio:okio:$okioVersion" + implementation "de.greenrobot:eventbus:$eventbusVersion" + implementation "io.reactivex:rxandroid:$rxAndroidVersion" + implementation "io.reactivex:rxjava:$rxJavaVersion" // And ProGuard rules for RxJava! - compile "com.artemzin.rxjava:proguard-rules:$rxJavaRulesVersion" - compile "com.joanzapata.iconify:android-iconify-fontawesome:$iconifyVersion" - compile "com.joanzapata.iconify:android-iconify-material:$iconifyVersion" - compile("com.afollestad.material-dialogs:commons:$materialDialogsVersion") { + implementation "com.artemzin.rxjava:proguard-rules:$rxJavaRulesVersion" + implementation "com.joanzapata.iconify:android-iconify-fontawesome:$iconifyVersion" + implementation "com.joanzapata.iconify:android-iconify-material:$iconifyVersion" + implementation("com.afollestad.material-dialogs:commons:$materialDialogsVersion") { transitive = true } - compile "com.yqritc:recyclerview-flexibledivider:$recyclerviewFlexibledividerVersion" - compile("com.githang:viewpagerindicator:2.5@aar") { + implementation "com.yqritc:recyclerview-flexibledivider:$recyclerviewFlexibledividerVersion" + implementation("com.githang:viewpagerindicator:2.5@aar") { exclude module: "support-v4" } - compile "com.github.shts:TriangleLabelView:$triangleLabelViewVersion" + implementation "com.github.shts:TriangleLabelView:$triangleLabelViewVersion" - compile "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion" + implementation "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion" - compile 'com.github.mfietz:fyydlin:v0.3' + implementation 'com.github.mfietz:fyydlin:v0.3' + + androidTestImplementation "com.jayway.android.robotium:robotium-solo:$robotiumSoloVersion" } play { diff --git a/build.gradle b/build.gradle index 632c8e7bdc2..e15625f13ec 100644 --- a/build.gradle +++ b/build.gradle @@ -4,12 +4,11 @@ buildscript { repositories { jcenter() mavenCentral() + google() } dependencies { - classpath "com.android.tools.build:gradle:2.3.3" - classpath "me.tatarka:gradle-retrolambda:3.7.0" - classpath "me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2" - classpath "com.github.triplet.gradle:play-publisher:1.1.4" + classpath "com.android.tools.build:gradle:3.0.1" + classpath "com.github.triplet.gradle:play-publisher:1.2.0" // Exclude the version that the android plugin depends on. configurations.classpath.exclude group: "com.android.tools.external.lombok" } @@ -18,6 +17,7 @@ buildscript { allprojects { repositories { jcenter() + google() } } @@ -38,7 +38,7 @@ subprojects { project.ext { compileSdkVersion = 25 - buildToolsVersion = "25.0.3" + buildToolsVersion = "27.0.3" minSdkVersion = 14 targetSdkVersion = 25 diff --git a/circle.yml b/circle.yml index 01055725a9f..138a7112757 100644 --- a/circle.yml +++ b/circle.yml @@ -3,7 +3,8 @@ general: - app/build/outputs/apk machine: environment: - GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' + GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx1536m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError"' + _JAVA_OPTIONS: "-Xms256m -Xmx1280m -XX:MaxPermSize=350m" java: version: oraclejdk8 dependencies: @@ -12,7 +13,7 @@ dependencies: - ~/android pre: - echo y | android update sdk --no-ui --all --filter "tool,extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository,android-25" - - echo y | android update sdk --no-ui --all --filter "build-tools-25.0.3" + - echo y | android update sdk --no-ui --all --filter "build-tools-27.0.3" override: - echo override dependencies diff --git a/core/build.gradle b/core/build.gradle index 3ef2898b83a..9967e99ffc9 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,5 +1,4 @@ apply plugin: "com.android.library" -apply plugin: "me.tatarka.retrolambda" android { compileSdkVersion rootProject.ext.compileSdkVersion @@ -30,11 +29,13 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } - publishNonDefault true + flavorDimensions "market" productFlavors { free { + dimension "market" } play { + dimension "market" } } @@ -46,32 +47,32 @@ repositories { } dependencies { - compile "com.android.support:support-v4:$supportVersion" - compile "com.android.support:appcompat-v7:$supportVersion" - compile "org.apache.commons:commons-lang3:$commonslangVersion" - compile ("org.shredzone.flattr4j:flattr4j-core:$flattr4jVersion") { + implementation "com.android.support:support-v4:$supportVersion" + implementation "com.android.support:appcompat-v7:$supportVersion" + implementation "org.apache.commons:commons-lang3:$commonslangVersion" + implementation ("org.shredzone.flattr4j:flattr4j-core:$flattr4jVersion") { exclude group: "org.json", module: "json" } - compile "commons-io:commons-io:$commonsioVersion" - compile "com.jayway.android.robotium:robotium-solo:$robotiumSoloVersion" - compile "org.jsoup:jsoup:$jsoupVersion" - compile "com.github.bumptech.glide:glide:$glideVersion" - compile "com.github.bumptech.glide:okhttp3-integration:$glideOkhttpIntegrationVersion@aar" - compile "com.squareup.okhttp3:okhttp:$okhttpVersion" - compile "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion" - compile "com.squareup.okio:okio:$okioVersion" - compile "de.greenrobot:eventbus:$eventbusVersion" - compile "io.reactivex:rxandroid:$rxAndroidVersion" + implementation "commons-io:commons-io:$commonsioVersion" + implementation "com.jayway.android.robotium:robotium-solo:$robotiumSoloVersion" + implementation "org.jsoup:jsoup:$jsoupVersion" + implementation "com.github.bumptech.glide:glide:$glideVersion" + implementation "com.github.bumptech.glide:okhttp3-integration:$glideOkhttpIntegrationVersion@aar" + implementation "com.squareup.okhttp3:okhttp:$okhttpVersion" + implementation "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion" + implementation "com.squareup.okio:okio:$okioVersion" + implementation "de.greenrobot:eventbus:$eventbusVersion" + implementation "io.reactivex:rxandroid:$rxAndroidVersion" - compile "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion" + implementation "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion" // Add casting features // free build hack: skip some dependencies if (!doFreeBuild()) { - playCompile "com.google.android.libraries.cast.companionlibrary:ccl:$castCompanionLibVer" - compile "com.android.support:mediarouter-v7:$supportVersion" - playCompile "com.google.android.gms:play-services-cast:$playServicesVersion" - compile "com.google.android.support:wearable:$wearableSupportVersion" + playApi "com.google.android.libraries.cast.companionlibrary:ccl:$castCompanionLibVer" + api "com.android.support:mediarouter-v7:$supportVersion" + playApi "com.google.android.gms:play-services-cast:$playServicesVersion" + api "com.google.android.support:wearable:$wearableSupportVersion" } else { System.out.println("core: free build hack, skipping some dependencies") } diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml index b9a9fb29328..13d956bab0a 100644 --- a/core/src/main/res/values/styles.xml +++ b/core/src/main/res/values/styles.xml @@ -11,57 +11,57 @@ @style/ProgressBarLight @style/Widget.AntennaPod.Button @style/AntennaPod.Dialog.Light - @color/grey600 - @drawable/ic_info_grey600_24dp - @drawable/ic_search_grey600_24dp - @drawable/ic_settings_input_antenna_grey600_24dp - @drawable/ic_file_download_grey600_24dp - @drawable/ic_fast_forward_grey600_24dp - @drawable/ic_pause_grey600_24dp - @drawable/ic_play_arrow_grey600_24dp - @drawable/ic_fast_rewind_grey600_24dp - @drawable/ic_delete_grey600_24dp - @drawable/ic_add_grey600_24dp - @drawable/ic_feed_grey600_24dp - @drawable/ic_web_grey600_24dp - @drawable/ic_done_grey600_24dp - @drawable/ic_cancel_grey600_24dp - @drawable/ic_expand_more_grey600_36dp - @drawable/ic_refresh_grey600_24dp - @drawable/navigation_up - @drawable/ic_share_grey600_24dp - @drawable/ic_list_grey600_24dp - @drawable/ic_hearing_grey600_18dp - @drawable/ic_remove_red_eye_grey600_18dp - @color/white - @color/overlay_light - @drawable/overlay_drawable - @drawable/ic_drag_vertical_grey600_48dp - @color/white - @color/white - @drawable/ic_new_releases_grey600_24dp - @drawable/ic_history_grey600_24dp - @drawable/ic_folder_grey600_24dp - @drawable/ic_play_arrow_grey600_36dp - @drawable/ic_pause_grey600_36dp - @drawable/ic_fast_forward_grey600_36dp - @drawable/ic_fast_rewind_grey600_36dp - @drawable/ic_skip_grey600_36dp - @drawable/ic_star_border_grey600_24dp - @drawable/ic_star_grey600_24dp - @drawable/ic_settings_grey600_24dp - @drawable/ic_lock_open_grey600_24dp - @drawable/ic_lock_closed_grey600_24dp - @drawable/ic_filter_grey600_24dp - @drawable/ic_sleep_grey600_24dp - @drawable/ic_sleep_off_grey600_24dp - @drawable/ic_check_box_grey600_24dp - @drawable/ic_check_box_outline_blank_grey600_24dp - @drawable/ic_indeterminate_check_box_grey600_24dp - @drawable/ic_sort_grey600_24dp - @drawable/ic_sd_storage_grey600_36dp - @drawable/ic_create_new_folder_grey600_24dp - @drawable/ic_cast_disconnect_grey600_36dp + @color/grey600 + @drawable/ic_info_grey600_24dp + @drawable/ic_search_grey600_24dp + @drawable/ic_settings_input_antenna_grey600_24dp + @drawable/ic_file_download_grey600_24dp + @drawable/ic_fast_forward_grey600_24dp + @drawable/ic_pause_grey600_24dp + @drawable/ic_play_arrow_grey600_24dp + @drawable/ic_fast_rewind_grey600_24dp + @drawable/ic_delete_grey600_24dp + @drawable/ic_add_grey600_24dp + @drawable/ic_feed_grey600_24dp + @drawable/ic_web_grey600_24dp + @drawable/ic_done_grey600_24dp + @drawable/ic_cancel_grey600_24dp + @drawable/ic_expand_more_grey600_36dp + @drawable/ic_refresh_grey600_24dp + @drawable/navigation_up + @drawable/ic_share_grey600_24dp + @drawable/ic_list_grey600_24dp + @drawable/ic_hearing_grey600_18dp + @drawable/ic_remove_red_eye_grey600_18dp + @color/white + @color/overlay_light + @drawable/overlay_drawable + @drawable/ic_drag_vertical_grey600_48dp + @color/white + @color/white + @drawable/ic_new_releases_grey600_24dp + @drawable/ic_history_grey600_24dp + @drawable/ic_folder_grey600_24dp + @drawable/ic_play_arrow_grey600_36dp + @drawable/ic_pause_grey600_36dp + @drawable/ic_fast_forward_grey600_36dp + @drawable/ic_fast_rewind_grey600_36dp + @drawable/ic_skip_grey600_36dp + @drawable/ic_star_border_grey600_24dp + @drawable/ic_star_grey600_24dp + @drawable/ic_settings_grey600_24dp + @drawable/ic_lock_open_grey600_24dp + @drawable/ic_lock_closed_grey600_24dp + @drawable/ic_filter_grey600_24dp + @drawable/ic_sleep_grey600_24dp + @drawable/ic_sleep_off_grey600_24dp + @drawable/ic_check_box_grey600_24dp + @drawable/ic_check_box_outline_blank_grey600_24dp + @drawable/ic_indeterminate_check_box_grey600_24dp + @drawable/ic_sort_grey600_24dp + @drawable/ic_sd_storage_grey600_36dp + @drawable/ic_create_new_folder_grey600_24dp + @drawable/ic_cast_disconnect_grey600_36dp