mirror of
https://github.com/Michatec/michas-droid.git
synced 2026-05-30 18:02:43 +02:00
- Updated the PreferencesFragment.kt
- New Build Variant added - New strings added in strings.xml - Updated build.gradle
This commit is contained in:
@@ -43,6 +43,18 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
flavorDimensions "distributor"
|
||||
productFlavors {
|
||||
michas {
|
||||
dimension "distributor"
|
||||
buildConfigField "boolean", "FLAVOR_FDROID", "false"
|
||||
}
|
||||
fdroid {
|
||||
dimension "distributor"
|
||||
buildConfigField "boolean", "FLAVOR_FDROID", "true"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled false
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.michatec.store.entity
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator
|
||||
import com.fasterxml.jackson.core.JsonParser
|
||||
import com.michatec.store.BuildConfig
|
||||
import com.michatec.store.utility.extension.json.*
|
||||
|
||||
data class Repository(
|
||||
@@ -72,36 +73,47 @@ data class Repository(
|
||||
lastModified, entityTag, updated, timestamp, authentication)
|
||||
}
|
||||
|
||||
private fun defaultRepository(address: String, name: String, description: String,
|
||||
private fun defaultRepository(address: String, name: String, description: String,
|
||||
version: Int, enabled: Boolean, fingerprint: String, authentication: String): Repository {
|
||||
return Repository(-1, address, emptyList(), name, description, version, enabled,
|
||||
fingerprint, "", "", 0L, 0L, authentication)
|
||||
}
|
||||
|
||||
val defaultRepositories = listOf(run {
|
||||
defaultRepository("https://repo.dgplayser.duckdns.org/fdroid/repo", "Michachatz F-Droid Repo", "Michachatz official repository. " +
|
||||
"Everything in this repository is always built from the source code.",
|
||||
21, true, "3546DCBDD900F280EE2161CC163C1156BE2C2F3EB810415115039E0C7D3242C0", "")
|
||||
},
|
||||
run {
|
||||
defaultRepository("https://f-droid.org/repo", "F-Droid", "The official F-Droid Free Software repository. " +
|
||||
"Everything in this repository is always built from the source code.",
|
||||
21, false, "43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB", "")
|
||||
}, run {
|
||||
defaultRepository("https://f-droid.org/archive", "F-Droid Archive", "The archive of the official F-Droid Free " +
|
||||
"Software repository. Apps here are old and can contain known vulnerabilities and security issues!",
|
||||
21, false, "43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB", "")
|
||||
}, run {
|
||||
defaultRepository("https://guardianproject.info/fdroid/repo", "Guardian Project Official Releases", "The " +
|
||||
"official repository of The Guardian Project apps for use with the F-Droid client. Applications in this " +
|
||||
"repository are official binaries built by the original application developers and signed by the same key as " +
|
||||
"the APKs that are released in the Google Play Store.",
|
||||
21, false, "B7C2EEFD8DAC7806AF67DFCD92EB18126BC08312A7F2D6F3862E46013C7A6135", "")
|
||||
}, run {
|
||||
defaultRepository("https://guardianproject.info/fdroid/archive", "Guardian Project Archive", "The official " +
|
||||
"repository of The Guardian Project apps for use with the F-Droid client. This contains older versions of " +
|
||||
"applications from the main repository.", 21, false,
|
||||
"B7C2EEFD8DAC7806AF67DFCD92EB18126BC08312A7F2D6F3862E46013C7A6135", "")
|
||||
})
|
||||
val defaultRepositories: List<Repository>
|
||||
get() {
|
||||
val isFdroid = BuildConfig.FLAVOR_FDROID
|
||||
return listOfNotNull(
|
||||
if (isFdroid) null else defaultRepository(
|
||||
"https://repo.dgplayser.duckdns.org/fdroid/repo",
|
||||
"Michachatz F-Droid Repo",
|
||||
"Michachatz official repository. Everything in this repository is always built from the source code.",
|
||||
21, true, "3546DCBDD900F280EE2161CC163C1156BE2C2F3EB810415115039E0C7D3242C0", ""
|
||||
),
|
||||
defaultRepository(
|
||||
"https://f-droid.org/repo",
|
||||
"F-Droid",
|
||||
"The official F-Droid Free Software repository. Everything in this repository is always built from the source code.",
|
||||
21, isFdroid, "43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB", ""
|
||||
),
|
||||
defaultRepository(
|
||||
"https://f-droid.org/archive",
|
||||
"F-Droid Archive",
|
||||
"The archive of the official F-Droid Free Software repository. Apps here are old and can contain known vulnerabilities and security issues!",
|
||||
21, false, "43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB", ""
|
||||
),
|
||||
defaultRepository(
|
||||
"https://guardianproject.info/fdroid/repo",
|
||||
"Guardian Project Official Releases",
|
||||
"The official repository of The Guardian Project apps for use with the F-Droid client.",
|
||||
21, false, "B7C2EEFD8DAC7806AF67DFCD92EB18126BC08312A7F2D6F3862E46013C7A6135", ""
|
||||
),
|
||||
defaultRepository(
|
||||
"https://guardianproject.info/fdroid/archive",
|
||||
"Guardian Project Archive",
|
||||
"The official repository of The Guardian Project apps for use with the F-Droid client. This contains older versions.",
|
||||
21, false, "B7C2EEFD8DAC7806AF67DFCD92EB18126BC08312A7F2D6F3862E46013C7A6135", ""
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,21 @@ class PreferencesFragment: ScreenFragment() {
|
||||
addSwitch(Preferences.Key.IncompatibleVersions, getString(R.string.incompatible_versions),
|
||||
getString(R.string.incompatible_versions_summary))
|
||||
}
|
||||
preferencesLayout.addCategory("Credits") {
|
||||
val texts = 16f
|
||||
addView(TextView(context).apply {
|
||||
setText(R.string.credits)
|
||||
textSize = texts
|
||||
setPadding(resources.sizeScaled(16), resources.sizeScaled(16), 0, resources.sizeScaled(8))
|
||||
setTextColor(context.getColorFromAttr(android.R.attr.textColorPrimary))
|
||||
})
|
||||
addView(TextView(context).apply {
|
||||
setText(R.string.credits_to_fork)
|
||||
textSize = texts
|
||||
setPadding(resources.sizeScaled(16), resources.sizeScaled(16), 0, resources.sizeScaled(14))
|
||||
setTextColor(context.getColorFromAttr(android.R.attr.textColorPrimary))
|
||||
})
|
||||
}
|
||||
|
||||
disposable = Preferences.observable
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<string name="always">Always</string>
|
||||
<string name="anti_features">Anti-features</string>
|
||||
<string name="application">Application</string>
|
||||
<string name="application_name" translatable="false">Store</string>
|
||||
<string name="application_name" translatable="false">Michas Store</string>
|
||||
<string name="application_not_found">Application not found</string>
|
||||
<string name="author_email">Author email</string>
|
||||
<string name="author_website">Author website</string>
|
||||
@@ -164,5 +164,7 @@
|
||||
<string name="waiting_to_start_download">Waiting to start download</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="address_redirect_FORMAT">The repository address was redirected to %s. Do you want to use it instead?</string>
|
||||
<string name="credits">Credits to Michatec</string>
|
||||
<string name="credits_to_fork">This is a fork from github.com/kitsunyan/foxy-droid.</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user