Commit 2180a51f authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Merge branch 'master' of...

Merge branch 'master' of https://git.frostnerd.com/PublicAndroidApps/smokescreen into 185-request-advanced-backup-and-restore
parents 9f2c6766 22924ff9
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
.gradle .gradle
local.properties local.properties
.DS_Store .DS_Store
!app/build/outputs/mapping/**/mapping.txt
!app/build/outputs/mapping/normalRelease/mapping.txt
!app/build/outputs/mapping/adblockerFdroid/mapping.txt
/build/** /build/**
captures/ captures/
.externalNativeBuild .externalNativeBuild
...@@ -11,9 +14,6 @@ captures/ ...@@ -11,9 +14,6 @@ captures/
.idea/markdown-navigator/profiles_settings.xml .idea/markdown-navigator/profiles_settings.xml
.idea/caches .idea/caches
!app/build/outputs/mapping/**/mapping.txt
# Created by https://www.gitignore.io/api/intellij # Created by https://www.gitignore.io/api/intellij
# User-specific stuff # User-specific stuff
.idea/**/workspace.xml .idea/**/workspace.xml
...@@ -34,6 +34,19 @@ captures/ ...@@ -34,6 +34,19 @@ captures/
.idea/**/uiDesigner.xml .idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml .idea/**/dbnavigator.xml
.idea/markdown-navigator.xml
.idea/markdown-navigator-enh.xml
.idea/navEditor.xml
# Gradle # Gradle
.idea/**/gradle.xml .idea/**/gradle.xml
.idea/**/libraries .idea/**/libraries
libs/
libs/**
.idea/markdown-navigator-enh.xml
.idea/markdown-navigator.xml
.idea/navEditor.xml
\ No newline at end of file
image: openjdk:8-jdk image: thyrlian/android-sdk
variables:
ANDROID_COMPILE_SDK: "28"
ANDROID_SDK_TOOLS: "26.1.1"
stages: stages:
- check
- test - test
- build - build
before_script: before_script:
- source /home/public/android-sdk-linux/initAndroid.sh -s ${ANDROID_COMPILE_SDK} - chmod +x gradlew
prepare_release:
stage: check
script:
- chmod +x prepareRelease.sh
- ./prepareRelease.sh
only:
- release
lint:
stage: test
script:
- ./gradlew lintNormalRelease
- ./gradlew lintAdblockerFdroid
only:
- release
- translations
#test:
# stage: test
# script:
# - ./gradlew test
build_debug:
stage: build
script:
- chmod +x changeVersion.sh
- ./changeVersion.sh app/build.gradle " $CI_COMMIT_REF_NAME\_$CI_PIPELINE_ID" --append
- ./gradlew assembleNormalDebug --stacktrace -x test
artifacts:
paths:
- app/build/outputs/apk/normal/debug/*.apk
expire_in: 5 days
only:
- translations
except:
- release
build_fdroid: build_fdroid:
stage: build stage: build
script: script:
- ./gradlew clean checkAdblockerFdroid assembleAdblockerFdroid --stacktrace -x test - wget -O $KEYSTORE_FILE $KEYSTORE_URL -q
- ./gradlew clean assembleAdblockerFdroid --stacktrace -x test
except: except:
- /^no_ci.*$/ - /^no_ci.*$/
- /^no_build.*$/ - /^no_build.*$/
...@@ -23,13 +59,16 @@ build_fdroid: ...@@ -23,13 +59,16 @@ build_fdroid:
paths: paths:
- app/build/outputs/apk/adblocker/fdroid/*.apk - app/build/outputs/apk/adblocker/fdroid/*.apk
- app/build/outputs/mapping/adblocker/fdroid/mapping.txt - app/build/outputs/mapping/adblocker/fdroid/mapping.txt
expire_in: 30 days
only: only:
- master - master
- release
build_release: build_release:
stage: build stage: build
script: script:
- ./gradlew clean checkNormalRelease assembleNormalRelease --stacktrace -x test - wget -O $KEYSTORE_FILE $KEYSTORE_URL -q
- ./gradlew clean assembleNormalRelease --stacktrace -x test
except: except:
- /^no_ci.*$/ - /^no_ci.*$/
- /^no_build.*$/ - /^no_build.*$/
...@@ -39,16 +78,19 @@ build_release: ...@@ -39,16 +78,19 @@ build_release:
paths: paths:
- app/build/outputs/apk/normal/release/*.apk - app/build/outputs/apk/normal/release/*.apk
- app/build/outputs/mapping/normal/release/mapping.txt - app/build/outputs/mapping/normal/release/mapping.txt
expire_in: 30 days
only: only:
- master - master
- release
test_build_release: test_build_release:
stage: test stage: test
script: script:
- ./gradlew clean checkNormalUnsignedRelease assembleNormalUnsignedRelease --stacktrace -x test - ./gradlew clean assembleNormalUnsignedRelease --stacktrace -x test
except: except:
- /^no_ci.*$/ - /^no_ci.*$/
- /^no_build.*$/ - /^no_build.*$/
- /^no_build_no_tests.*$/ - /^no_build_no_tests.*$/
- /^no_build_no_deploy.*$/ - /^no_build_no_deploy.*$/
- master - master
\ No newline at end of file - release
\ No newline at end of file
...@@ -27,9 +27,30 @@ ...@@ -27,9 +27,30 @@
<JetCodeStyleSettings> <JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" /> <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings> </JetCodeStyleSettings>
<MarkdownNavigatorCodeStyleSettings> <DBN-PSQL>
<option name="RIGHT_MARGIN" value="72" /> <case-options enabled="false">
</MarkdownNavigatorCodeStyleSettings> <option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false" />
</DBN-PSQL>
<DBN-SQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false">
<option name="STATEMENT_SPACING" value="one_line" />
<option name="CLAUSE_CHOP_DOWN" value="chop_down_if_statement_long" />
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</DBN-SQL>
<codeStyleSettings language="XML"> <codeStyleSettings language="XML">
<arrangement> <arrangement>
<rules> <rules>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules"> <option name="modules">
......
<component name="InspectionProjectProfileManager"> <component name="InspectionProjectProfileManager">
<profile version="1.0"> <profile version="1.0">
<option name="myName" value="Project Default" /> <option name="myName" value="Project Default" />
<inspection_tool class="SSBasedInspection" enabled="true" level="WARNING" enabled_by_default="true">
<searchConfiguration name="Use Preferences (from AndroidUtils) instead of SharedPreferences" text="SharedPreferences" recursive="false" caseInsensitive="true" type="JAVA" />
<searchConfiguration name="Use Preferences (from AndroidUtils) instead of SharedPreferences" text="PreferenceManager.getDefaultSharedPreferences();" recursive="false" caseInsensitive="true" type="JAVA" />
</inspection_tool>
</profile> </profile>
</component> </component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownProjectSettings" wasCopied="false">
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true" openRemoteLinks="true" replaceUnicodeEmoji="false" lastLayoutSetsDefault="false">
<PanelProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
</PanelProvider>
</PreviewSettings>
<ParserSettings gitHubSyntaxChange="false" emojiShortcuts="1" emojiImages="0">
<PegdownExtensions>
<option name="ABBREVIATIONS" value="false" />
<option name="ANCHORLINKS" value="true" />
<option name="ASIDE" value="false" />
<option name="ATXHEADERSPACE" value="true" />
<option name="AUTOLINKS" value="false" />
<option name="DEFINITIONS" value="false" />
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
<option name="FENCED_CODE_BLOCKS" value="true" />
<option name="FOOTNOTES" value="false" />
<option name="HARDWRAPS" value="false" />
<option name="HTML_DEEP_PARSER" value="false" />
<option name="INSERTED" value="false" />
<option name="QUOTES" value="false" />
<option name="RELAXEDHRULES" value="true" />
<option name="SMARTS" value="false" />
<option name="STRIKETHROUGH" value="true" />
<option name="SUBSCRIPT" value="false" />
<option name="SUPERSCRIPT" value="false" />
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
<option name="SUPPRESS_INLINE_HTML" value="false" />
<option name="TABLES" value="true" />
<option name="TASKLISTITEMS" value="true" />
<option name="TOC" value="false" />
<option name="WIKILINKS" value="false" />
</PegdownExtensions>
<ParserOptions>
<option name="ADMONITION_EXT" value="false" />
<option name="ATTRIBUTES_EXT" value="false" />
<option name="COMMONMARK_LISTS" value="true" />
<option name="DUMMY" value="false" />
<option name="EMOJI_SHORTCUTS" value="true" />
<option name="ENUMERATED_REFERENCES_EXT" value="false" />
<option name="FLEXMARK_FRONT_MATTER" value="false" />
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
<option name="GFM_TABLE_RENDERING" value="true" />
<option name="GITBOOK_URL_ENCODING" value="false" />
<option name="GITHUB_LISTS" value="false" />
<option name="GITHUB_WIKI_LINKS" value="false" />
<option name="GITLAB_EXT" value="false" />
<option name="GITLAB_MATH_EXT" value="false" />
<option name="GITLAB_MERMAID_EXT" value="false" />
<option name="HEADER_ID_NON_ASCII_TO_LOWERCASE" value="false" />
<option name="HEADER_ID_NO_DUPED_DASHES" value="false" />
<option name="JEKYLL_FRONT_MATTER" value="false" />
<option name="MACROS_EXT" value="false" />
<option name="NO_TEXT_ATTRIBUTES" value="false" />
<option name="PARSE_HTML_ANCHOR_ID" value="false" />
<option name="PLANTUML_FENCED_CODE" value="false" />
<option name="PUML_FENCED_CODE" value="false" />
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
</ParserOptions>
</ParserSettings>
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true" embedImages="false" embedHttpImages="false" imageUriSerials="false" addDocTypeHtml="true" noParaTags="false" plantUmlConversion="0" mathConversion="0">
<GeneratorProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
</GeneratorProvider>
<headerTop />
<headerBottom />
<bodyTop />
<bodyBottom />
</HtmlSettings>
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssUriSerial="true" isCssTextEnabled="false" isDynamicPageWidth="true">
<StylesheetProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
</StylesheetProvider>
<ScriptProviders />
<cssText />
<cssUriHistory />
</CssSettings>
<AnnotatorSettings targetHasSpaces="true" linkCaseMismatch="true" wikiCaseMismatch="true" wikiLinkHasDashes="true" notUnderWikiHome="true" targetNotWikiPageExt="true" notUnderSourceWikiHome="true" targetNameHasAnchor="true" targetPathHasAnchor="true" wikiLinkHasSlash="true" wikiLinkHasSubdir="true" wikiLinkHasOnlyAnchor="true" linkTargetsWikiHasExt="true" linkTargetsWikiHasBadExt="true" notUnderSameRepo="true" targetNotUnderVcs="false" linkNeedsExt="true" linkHasBadExt="true" linkTargetNeedsExt="true" linkTargetHasBadExt="true" wikiLinkNotInWiki="true" imageTargetNotInRaw="true" repoRelativeAcrossVcsRoots="true" multipleWikiTargetsMatch="true" unresolvedLinkReference="true" linkIsIgnored="true" anchorIsIgnored="true" anchorIsUnresolved="true" anchorLineReferenceIsUnresolved="true" anchorLineReferenceFormat="true" anchorHasDuplicates="true" abbreviationDuplicates="true" abbreviationNotUsed="true" attributeIdDuplicateDefinition="true" attributeIdNotUsed="true" footnoteDuplicateDefinition="true" footnoteUnresolved="true" footnoteDuplicates="true" footnoteNotUsed="true" macroDuplicateDefinition="true" macroUnresolved="true" macroDuplicates="true" macroNotUsed="true" referenceDuplicateDefinition="true" referenceUnresolved="true" referenceDuplicates="true" referenceNotUsed="true" referenceUnresolvedNumericId="true" enumRefDuplicateDefinition="true" enumRefUnresolved="true" enumRefDuplicates="true" enumRefNotUsed="true" enumRefLinkUnresolved="true" enumRefLinkDuplicates="true" simTocUpdateNeeded="true" simTocTitleSpaceNeeded="true" />
<HtmlExportSettings updateOnSave="false" parentDir="" targetDir="" cssDir="css" scriptDir="js" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetPathType="2" targetExt="" useTargetExt="false" noCssNoScripts="false" useElementStyleAttribute="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" linkFormatType="HTTP_ABSOLUTE" />
<LinkMapSettings>
<textMaps />
</LinkMapSettings>
</component>
</project>
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/SmokeScreen.iml" filepath="$PROJECT_DIR$/SmokeScreen.iml" /> <module fileurl="file://$PROJECT_DIR$/SmokeScreen.iml" filepath="$PROJECT_DIR$/SmokeScreen.iml" group="SmokeScreen" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" group="SmokeScreen/app" />
</modules> </modules>
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -111,6 +111,8 @@ A list of some extraordinary people who contributed to this project: ...@@ -111,6 +111,8 @@ A list of some extraordinary people who contributed to this project:
- Dutch translation by Bas Koedijk - Dutch translation by Bas Koedijk
- Portuguese translation by Rafael W. Bohnenberger - Portuguese translation by Rafael W. Bohnenberger
- Indonesian translation by Gloeyisk - Indonesian translation by Gloeyisk
- Catalan translation by Daniel Alomar
- Spanish translation by Victor Bayas
<br/> <br/>
<br/> <br/>
...@@ -121,7 +123,7 @@ A list of some extraordinary people who contributed to this project: ...@@ -121,7 +123,7 @@ A list of some extraordinary people who contributed to this project:
This work is licensed under the GNU GPLv3 License. Different license-agreements can be made with the developer, if needed. This work is licensed under the GNU GPLv3 License. Different license-agreements can be made with the developer, if needed.
Copyright (C) 2019 Daniel Wolf Copyright (C) 2020 Daniel Wolf
<br> <br>
<br> <br>
...@@ -153,12 +155,7 @@ This work contains third-party content, namely: ...@@ -153,12 +155,7 @@ This work contains third-party content, namely:
# Cloning # Cloning
Feel free to clone this software. However, there are a few things to notice: Feel free to clone this software. However, there are a few things to notice:
- This app uses some of my own libraries which are only accessible when logged into this GitLab instance. Signing up is free and no tracking is in place. - This app uses some of my own libraries. Those are OSS as well, you can find the URLs in the `build.gradle`.
- These libraries are distributed using an Artifactory server. **This server is not public, but I do hand out credentials on request**. - These libraries are distributed as pre-built binaries using an Nexus3 server. Public credentials are contained in the root `build.gradle`
- Alternatively, replace the dependencies (`implementation 'com.frostnerd.utilskt:....`) with git sub-modules (`implementation project(...)`) after cloning the libraries. - Alternatively, replace the dependencies (`implementation 'com.frostnerd.utilskt:....`) with git sub-modules (`implementation project(...)`) after cloning the libraries.
- Nebulo uses icons from Font Awesome covered under their free license. Nebulo gives attribution in the Credits section. - Nebulo uses icons from Font Awesome covered under their free license. Nebulo gives attribution in the Credits section.
</br> \ No newline at end of file
</br>
</br>
\ No newline at end of file
...@@ -4,13 +4,25 @@ Whilst English is the second most spoken language there are a lot of people out ...@@ -4,13 +4,25 @@ Whilst English is the second most spoken language there are a lot of people out
This is where you come in: I speak German and English but can't deliver any other translations. This is why I'd like to ask anyone who is willing to help to consider contributing translations or checking existing translations. This is where you come in: I speak German and English but can't deliver any other translations. This is why I'd like to ask anyone who is willing to help to consider contributing translations or checking existing translations.
# How it's done # How it's done
I use an web-based translations editor called [Weblate](weblate.org) (open-source software, available under the GPLv3) to make managing translations easy. I use an web-based translations editor called [Weblate](http://weblate.org) (open-source software, available under the GPLv3) to make managing translations easy.
I host my [own instance of Weblate](https://weblate.frostnerd.com) -- [creating an account](https://weblate.frostnerd.com/accounts/register/) is free and neither does the site contain ads, nor does it use any tracking (look at the privacy policy below though!). I host my [own instance of Weblate](https://weblate.frostnerd.com) -- [creating an account](https://weblate.frostnerd.com/accounts/register/) is free and neither does the site contain ads, nor does it use any tracking (look at the privacy policy below though!).
See below for a quick tutorial on how to use Weblate. See below for a quick tutorial on how to use Weblate.
**Important!**<br>
I have both a DeepL and a Google Translate API key which I can use to automatically translate the texts to add suggestions to Weblate. Those suggestions won't be used as translations util they are approved. Suggestions fasten the process of translating tremendously as the automatic translation in some cases is already very good or just requires manual edits. Let me know if you want to translate into a new language and I can add the automatic suggestions for those languages to make it faster for you!<br>
## Credentials
If for whatever reason you don't want to create an account you can contact me. I'll then provide you with credentials.
This can for example be useful if you don't want your Name to be assigned with the commit and instead want to remain anonymous.
# How to view your translations
Contributed translations are pushed regularly by Weblate. In some cases it takes some times until this happens.
A new APK file is then automatically created which contains those new translations. You can always download the latest version of [this file here](https://git.frostnerd.com/PublicAndroidApps/smokescreen/-/jobs/artifacts/translations/raw/app/build/outputs/apk/normal/debug/app-normal-debug.apk?job=build_debug).
Please use it to verify your contribution.
# The current state # The current state
Right now the app contains German, English, Dutch, Portuguese, Russian, Indonesian and Turkish translations. This is already a good number of translations, but your help is needed to push it even further. Right now the app contains a good number of translations, but your help is needed to push it even further.
<a href="https://weblate.frostnerd.com/engage/nebulo/?utm_source=widget"> <a href="https://weblate.frostnerd.com/engage/nebulo/?utm_source=widget">
<img src="https://weblate.frostnerd.com/widgets/nebulo/-/multi-green.svg" alt="Translation state" /> <img src="https://weblate.frostnerd.com/widgets/nebulo/-/multi-green.svg" alt="Translation state" />
...@@ -50,7 +62,7 @@ Here's a quick tutorial on how to contribute a translation. ...@@ -50,7 +62,7 @@ Here's a quick tutorial on how to contribute a translation.
8. [Select](material/translating/translation_overview.png) one of "All strings", "Strings needing action", "Not translated strings" or "Strings needing action without suggestions" or "Translated strings". 8. [Select](material/translating/translation_overview.png) one of "All strings", "Strings needing action", "Not translated strings" or "Strings needing action without suggestions" or "Translated strings".
9. You'll be taken to the [translation editor](material/translating/translation_editor.png) (I choose "Not translated strings") 9. You'll be taken to the [translation editor](material/translating/translation_editor.png) (I choose "Not translated strings")
10. You can now select the translation source (English texts) and enter translations or suggestions for the language. 10. You can now select the translation source (English texts) and enter translations or suggestions for the language.
- You can also switch to [Zen mode](material/translating/translation_editor_zen.png) using the button in the right corner. - You can also switch to [Zen mode](material/translating/translation_editor_zen.png) using the button in the right corner.
11. There is much more this tool is able to do, feel free to experiment (or read [the docs](https://docs.weblate.org/en/weblate-3.6.1/index.html))! 11. There is much more this tool is able to do, feel free to experiment (or read [the docs](https://docs.weblate.org/en/weblate-3.6.1/index.html))!
# License # License
......
...@@ -6,32 +6,18 @@ apply plugin: 'kotlin-kapt' ...@@ -6,32 +6,18 @@ apply plugin: 'kotlin-kapt'
def debugKeyPath = new File(System.properties['user.home'], ".android/debug.keystore") def debugKeyPath = new File(System.properties['user.home'], ".android/debug.keystore")
android { android {
signingConfigs {
fromVariablesOrDebug {
storeFile new File(getSystemVariableOrDefault("KEYSTORE_FILE", debugKeyPath.path))
storePassword getSystemVariableOrDefault("KEYSTORE_PASSWORD", "android")
keyAlias = getSystemVariableOrDefault("KEYSTORE_KEY_NAME", "androiddebugkey")
keyPassword getSystemVariableOrDefault("KEYSTORE_KEY_PASSWORD", "android")
}
release {
storeFile new File(getSystemVariableOrDefault("KEYSTORE_FILE", ""))
storePassword getSystemVariableOrDefault("KEYSTORE_PASSWORD", "")
keyAlias = getSystemVariableOrDefault("KEYSTORE_KEY_NAME", "")
keyPassword getSystemVariableOrDefault("KEYSTORE_KEY_PASSWORD", "")
}
}
compileSdkVersion 29 compileSdkVersion 29
defaultConfig { defaultConfig {
applicationId "com.frostnerd.smokescreen" applicationId "com.frostnerd.smokescreen"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode 53 versionCode 60
versionName "1.1.0" versionName "1.3.0-Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField("Boolean", "FROM_CI", String.valueOf(getSystemVariableOrDefault("CI_COMMIT_SHORT_SHA", "") != "")) buildConfigField("Boolean", "FROM_CI", String.valueOf(getSystemVariableOrDefault("CI_COMMIT_SHORT_SHA", "") != ""))
buildConfigField("String", "COMMIT_HASH", '"' + getGitCommitHash() + '"') buildConfigField("String", "COMMIT_HASH", '"' + getGitCommitHash() + '"')
buildConfigField("String", "SENTRY_DSN", '"' + getSystemVariableOrDefault("SENTRY_DSN", "dummy") + '"') buildConfigField("String", "SENTRY_DSN", '""')
kapt { kapt {
arguments { arguments {
...@@ -47,6 +33,20 @@ android { ...@@ -47,6 +33,20 @@ android {
useSupportLibrary = true useSupportLibrary = true
} }
} }
signingConfigs {
fromVariablesOrDebug {
storeFile new File(getSystemVariableOrDefault("KEYSTORE_FILE", debugKeyPath.path))
storePassword getSystemVariableOrDefault("KEYSTORE_PASSWORD", "android")
keyAlias = getSystemVariableOrDefault("KEYSTORE_KEY_NAME", "androiddebugkey")
keyPassword getSystemVariableOrDefault("KEYSTORE_KEY_PASSWORD", "android")
}
release {
storeFile new File(getSystemVariableOrDefault("KEYSTORE_FILE", ""))
storePassword getSystemVariableOrDefault("KEYSTORE_PASSWORD", "")
keyAlias = getSystemVariableOrDefault("KEYSTORE_KEY_NAME", "")
keyPassword getSystemVariableOrDefault("KEYSTORE_KEY_PASSWORD", "")
}
}
sourceSets { sourceSets {
androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
debug.assets.srcDirs += files("$projectDir/schemas".toString()) debug.assets.srcDirs += files("$projectDir/schemas".toString())
...@@ -65,10 +65,12 @@ android { ...@@ -65,10 +65,12 @@ android {
buildConfigField("Boolean", "LEAK_DETECTION", "false") buildConfigField("Boolean", "LEAK_DETECTION", "false")
} }
leakCanary { leakCanary {
matchingFallbacks = ['debug']
initWith buildTypes.debug initWith buildTypes.debug
buildConfigField("Boolean", "LEAK_DETECTION", "true") buildConfigField("Boolean", "LEAK_DETECTION", "true")
} }
fdroid { fdroid {
matchingFallbacks = ['release']
initWith release initWith release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
...@@ -83,10 +85,12 @@ android { ...@@ -83,10 +85,12 @@ android {
flavorDimensions "version" flavorDimensions "version"
productFlavors { productFlavors {
adblocker { adblocker {
matchingFallbacks = ['default']
dimension "version" dimension "version"
versionNameSuffix "-adblock" versionNameSuffix "-adblock"
} }
normal { normal {
matchingFallbacks = ['default']
dimension "version" dimension "version"
} }
} }
...@@ -104,34 +108,35 @@ android { ...@@ -104,34 +108,35 @@ android {
} }
lintOptions{ lintOptions{
disable 'MissingTranslation' disable 'MissingTranslation'
disable 'InvalidPeriodicWorkRequestInterval'
} }
} dependenciesInfo {
includeInApk = false
configurations.all { includeInBundle = false
resolutionStrategy {
force 'org.slf4j:slf4j-api:1.7.26'
force 'androidx.recyclerview:recyclerview:1.1.0'
} }
} }
dependencies { dependencies {
def room_version = "2.2.2" def room_version = "2.2.5"
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2' implementation('org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7')
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7'
implementation 'com.frostnerd.utilskt:preferences:1.5.17' // https://git.frostnerd.com/AndroidUtils/preferenceskt println "Using compiled binaries"
implementation 'com.frostnerd.utilskt:navigationdraweractivity:1.3.29' // https://git.frostnerd.com/AndroidUtils/navigationdraweractivity implementation 'com.frostnerd.utilskt:preferences:1.5.22' // https://git.frostnerd.com/AndroidUtils/preferenceskt
implementation 'com.frostnerd.utilskt:encrypteddnstunnelproxy:1.5.172' // https://git.frostnerd.com/AndroidUtils/encrypteddnstunnelproxy implementation 'com.frostnerd.utilskt:navigationdraweractivity:1.3.36' // https://git.frostnerd.com/AndroidUtils/navigationdraweractivity
implementation 'com.frostnerd.utilskt:general:1.0.19' // https://git.frostnerd.com/AndroidUtils/generalkt implementation 'com.frostnerd.utilskt:encrypteddnstunnelproxy:1.5.201' // https://git.frostnerd.com/AndroidUtils/encrypteddnstunnelproxy
implementation 'com.frostnerd.utilskt:adapters:1.1.6' // https://git.frostnerd.com/AndroidUtils/Adapters implementation 'com.frostnerd.utilskt:general:1.0.24' // https://git.frostnerd.com/AndroidUtils/generalkt
implementation 'com.frostnerd.utilskt:adapters:1.1.15' // https://git.frostnerd.com/AndroidUtils/Adapters
implementation 'androidx.work:work-runtime:2.2.0' implementation 'androidx.work:work-runtime:2.3.4'
implementation 'androidx.appcompat:appcompat:1.1.0'