2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-02 03:40:16 +00:00
iceraven-browser/build.gradle

227 lines
7.3 KiB
Groovy
Raw Normal View History

// Top-level build file where you can add configuration options common to all sub-projects/modules.
import org.mozilla.fenix.gradle.tasks.GithubDetailsTask
buildscript {
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
// This logic is duplicated in the allprojects block: I don't know how to fix that.
repositories {
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
maven {
name "Mozilla Nightly"
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
url "https://nightly.maven.mozilla.org/maven2"
content {
// Improve performance: only check moz maven for mozilla deps.
includeGroupByRegex RepoMatching.mozilla
}
}
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
maven {
name "Mozilla"
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
url "https://maven.mozilla.org/maven2"
content {
// Improve performance: only check moz maven for mozilla deps.
includeGroupByRegex RepoMatching.mozilla
}
}
if (project.hasProperty("googleRepo")) {
maven {
name "Google"
allowInsecureProtocol true // Local Nexus in CI uses HTTP
url project.property("googleRepo")
}
} else {
google() {
content {
// Improve performance: only check google maven for google deps.
includeGroupByRegex RepoMatching.androidx
includeGroupByRegex RepoMatching.comGoogleAndroid
includeGroupByRegex RepoMatching.comGoogleFirebase
includeGroupByRegex RepoMatching.comGoogleTesting
includeGroupByRegex RepoMatching.comAndroid
}
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
}
}
if (project.hasProperty("centralRepo")) {
maven {
name "MavenCentral"
url project.property("centralRepo")
allowInsecureProtocol true // Local Nexus in CI uses HTTP
}
} else {
mavenCentral() {
content {
// Improve security: don't search deps with known repos.
excludeGroupByRegex RepoMatching.mozilla
excludeGroupByRegex RepoMatching.androidx
excludeGroupByRegex RepoMatching.comGoogleAndroid
excludeGroupByRegex RepoMatching.comGoogleFirebase
excludeGroupByRegex RepoMatching.comAndroid
}
}
}
}
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
dependencies {
classpath Deps.tools_androidgradle
classpath Deps.tools_kotlingradle
classpath Deps.tools_benchmarkgradle
classpath Deps.androidx_safeargs
classpath Deps.allopen
classpath Deps.osslicenses_plugin
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
classpath "org.mozilla.components:tooling-glean-gradle:${Versions.mozilla_android_components}"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id("io.gitlab.arturbosch.detekt").version("1.17.1")
}
allprojects {
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
// This logic is duplicated in the buildscript block: I don't know how to fix that.
repositories {
maven {
name "Mozilla Nightly"
url "https://nightly.maven.mozilla.org/maven2"
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
content {
// Improve performance: only check moz maven for mozilla deps.
includeGroupByRegex RepoMatching.mozilla
}
}
maven {
name "Mozilla"
url "https://maven.mozilla.org/maven2"
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
content {
// Improve performance: only check moz maven for mozilla deps.
includeGroupByRegex RepoMatching.mozilla
}
}
if (project.hasProperty("googleRepo")) {
maven {
name "Google"
url project.property("googleRepo")
allowInsecureProtocol true // Local Nexus in CI uses HTTP
}
} else {
google() {
content {
// Improve performance: only check google maven for google deps.
includeGroupByRegex RepoMatching.androidx
includeGroupByRegex RepoMatching.comGoogleAndroid
includeGroupByRegex RepoMatching.comGoogleFirebase
includeGroupByRegex RepoMatching.comAndroid
}
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
}
}
if (project.hasProperty("centralRepo")) {
maven {
name "MavenCentral"
url project.property("centralRepo")
allowInsecureProtocol true // Local Nexus in CI uses HTTP
}
} else {
mavenCentral() {
content {
// Improve security: don't search deps with known repos.
excludeGroupByRegex RepoMatching.mozilla
excludeGroupByRegex RepoMatching.androidx
excludeGroupByRegex RepoMatching.comGoogleAndroid
excludeGroupByRegex RepoMatching.comGoogleFirebase
excludeGroupByRegex RepoMatching.comAndroid
}
}
}
}
[fenix] For https://github.com/mozilla-mobile/fenix/issues/9644: restrict deps to specific repositories (https://github.com/mozilla-mobile/fenix/pull/9649) * For https://github.com/mozilla-mobile/fenix/issues/9644: remove unnecessary leanplum maven repository. The docs say it is [1] "only needed for Android SDK versions below 4.3.0". That is API 18 and our min SDK is 21. [1]: https://docs.leanplum.com/reference#android-setup * For https://github.com/mozilla-mobile/fenix/issues/9644: move buildscript block from :app to root project. This will reduce the amount of duplication we need in specifying restricted dependencies and centralize repository definitions. Since we're a one project app, it shouldn't have a significant impact on performance. * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict dependencies following FFTV config. However, there is a resolution error to be fixed in the next commit. This is verbatim from FFTV except I removed the no-op "improve security if code is refactored incorrectly" lines: these lines rarely changed and I'm not that concerned. It might be better to simplify the configuration. Source: https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt#L7 https://github.com/mozilla-mobile/firefox-tv/blob/62a2fa680c49beae271b55981d7afecc67d2aa21/build.gradle#L31 * For https://github.com/mozilla-mobile/fenix/issues/9644: restrict firebase deps to google repo. This fixes the resolution error from the previous PR.
2020-04-15 17:54:36 +00:00
2020-08-04 17:56:28 +00:00
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.allWarningsAsErrors = true
kotlinOptions.freeCompilerArgs += [
"-Xuse-experimental=kotlin.Experimental",
"-Xopt-in=kotlin.RequiresOptIn"
]
}
}
2020-08-04 17:56:28 +00:00
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
detekt {
// The version number is duplicated, please refer to plugins block for more details
version = "1.17.1"
[fenix] For https://github.com/mozilla-mobile/fenix/issues/5574 - Migrate SessionControl to LibState (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 1: Port TabAction.SaveTabGroup to TabSessionInteractor and SessionControlController. (https://github.com/mozilla-mobile/fenix/pull/6651) - Introduces the TabSessionInteractor, SessionControlInteractor and SessionControlController classes. - Removes the TabAction.SaveTabGroup. * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 2: Port TabAction.PrivateBrowsingLearnMore to TabSessionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 3: Port TabAction.ShareTabs to TabSessionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 4: Remove unused TabAction.Share and TabItemMenu (https://github.com/mozilla-mobile/fenix/pull/6651) In https://github.com/mozilla-mobile/fenix/issues/2205, the tab overflow button was removed which would have shown the TabItemMenu when clicked. So, we can remove TabItemMenu since it is not used and as a result, we can also remove TabAction.Share since there are no consumers. * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 5: Port TabAction.PlayMedia and TabAction.PauseMedia to TabSessionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 6: Port TabAction.Select to TabSessionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 7: Port Onboarding.Finish to OnboardingInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 8: Port TabAction.Close and TabAction.CloseAll to TabSessionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) - Removes TabAction * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 9: Port CollectionAction.Delete to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 10: Port CollectionAction.ShareTabs to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 11: Port CollectionAction.AddTab and CollectionAction.Rename to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 12: Port CollectionAction.RemoveTab to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 13: Port CollectionAction.OpenTab to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 14: Port CollectionAction.CloseTabs to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 15: Introduce a HomeFragmentStore (https://github.com/mozilla-mobile/fenix/pull/6651) - We will hook up the HomeFragmentStore in later parts. - Removes List<Tab>.toSessionBundle(context: Context) since it is unused. * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 16: Port CollectionAction.Collapse and CollectionAction.Expand to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) - We assume the store is hooked up to the SessionControlController in this part, but this work will be done in a later part. - Removes CollectionAction. * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 20: Remove the architecture module. (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 17: Remove duplicate subscribeToTabCollections in BrowserFragment.kt (https://github.com/mozilla-mobile/fenix/pull/6651) There is a duplicate call of subscribeToTabCollections() in both HomeFragment and BrowserFragment. In this patch, we remove the call in BrowserFragment to avoid passing the HomeFragmentStore to BrowserFragment in order to dispatch the CollectionsChange event. * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 18: Delete SessionControlComponent and fix TabCollection and Tab imports (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 19: Use the new HomeFragmentStore in the HomeFragment (https://github.com/mozilla-mobile/fenix/pull/6651) - Renames SessionControlUIView to SessionControlView * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 21: Fix white screen on home fragment (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 22: Fix formatting in SessionControlInteractor and replace See with @see in SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 23: Move to metrics.track call to the beginning of handleCollectionRemoveTab (https://github.com/mozilla-mobile/fenix/pull/6651) This ensures that the metrics.track will be called immediately before the tab is removed from the collection. * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 24: Use the sessionManager getter in SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 25: Use mapNotNull in List<Tab>.toSessionBundle (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 26: Simplify closeTab and closeAllTabs functions by assigning a deletionJob constant (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 27: Replace listOf() with emptyList() in removeAllTabsWithUndo (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 28: Replace the Context parameter with the HomeActivity in SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 29: Add test for HomeFragmentStore, DefaultSessionControlController and SessionControlInteractor (https://github.com/mozilla-mobile/fenix/pull/6651) * For https://github.com/mozilla-mobile/fenix/issues/5574 - Removes running CI against the architecture debug build varient
2019-12-05 03:06:05 +00:00
input = files("$projectDir/app/src")
config = files("$projectDir/config/detekt.yml")
reports {
html {
enabled = true
destination = file("$projectDir/build/reports/detekt.html")
}
xml {
enabled = false
}
}
}
configurations {
ktlint
}
dependencies {
2021-07-29 15:37:31 +00:00
ktlint("com.pinterest:ktlint:0.41.0") {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL))
}
}
detekt project(":mozilla-detekt-rules")
detekt "io.gitlab.arturbosch.detekt:detekt-cli:${Versions.detekt}"
}
2020-08-04 17:56:28 +00:00
tasks.register('ktlint', JavaExec) {
group = "verification"
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
2021-07-29 15:37:31 +00:00
args "app/src/**/*.kt", "!**/build/**/*.kt"
}
2021-07-29 15:38:00 +00:00
task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "-F", "app/src/**/*.kt", "!**/build/**/*.kt"
}
2020-08-04 17:56:28 +00:00
tasks.withType(io.gitlab.arturbosch.detekt.Detekt.class).configureEach {
exclude("**/resources/**")
exclude("**/tmp/**")
}
tasks.register("listRepositories") {
doLast {
println "Repositories:"
project.repositories.each { println "Name: " + it.name + "; url: " + it.url }
2020-08-04 17:56:28 +00:00
}
}
tasks.register("githubTestDetails", GithubDetailsTask) {
text = "### [Unit Test Results]({reportsUrl}/test/testDebugUnitTest/index.html)"
}
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
text = "### [Detekt Results]({reportsUrl}/detekt.html)"
}
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
text = "### [Android Lint Results]({reportsUrl}/lint-results-debug.html)"
}