1
0
mirror of https://github.com/dzeiocom/OpenHealth.git synced 2025-04-22 19:02:16 +00:00

feat(app): Add OSS licenses notice #69

This commit is contained in:
Florian Bouillon 2022-08-23 19:46:50 +02:00
parent 47a91fcc09
commit 218d23f223
4 changed files with 30 additions and 6 deletions

View File

@ -8,6 +8,9 @@ plugins {
// Safe Navigation
id("androidx.navigation.safeargs")
// OSS Licenses
id("com.google.android.gms.oss-licenses-plugin")
// keep at bottom
kotlin("kapt")
}
@ -29,7 +32,7 @@ android {
keyAlias = keystoreProperties["keyAlias"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
}
} catch (e: Exception) {}
} catch (_: Exception) {}
}
}
@ -113,9 +116,9 @@ dependencies {
// Core dependencies
implementation("androidx.core:core-ktx:1.8.0")
implementation("androidx.appcompat:appcompat:1.6.0-alpha05")
implementation("androidx.appcompat:appcompat:1.6.0-beta01")
implementation("javax.inject:javax.inject:1")
implementation("com.google.android.material:material:1.7.0-alpha03")
implementation("com.google.android.material:material:1.7.0-beta01")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.5.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
@ -176,4 +179,7 @@ dependencies {
implementation("com.google.guava:guava:31.1-jre")
implementation("androidx.concurrent:concurrent-futures:1.1.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.6.4")
// OSS Licenses
implementation("com.google.android.gms:play-services-oss-licenses:17.0.0")
}

View File

@ -47,6 +47,19 @@
</intent-filter>
</activity>
<activity android:name=".ui.ErrorActivity"
android:theme="@style/Theme.OpenHealth.NoActionBar"
android:exported="false" />
<!-- OSS Licenses-->
<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
android:theme="@style/Theme.OpenHealth" />
<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
android:theme="@style/Theme.OpenHealth" />
<service
android:name=".services.OpenHealthService"
android:permission="android.permission.ACTIVITY_RECOGNITION" />
@ -60,9 +73,6 @@
android:value="true" />
</service>
<activity android:name=".ui.ErrorActivity"
android:theme="@style/Theme.OpenHealth.NoActionBar"
android:exported="false" />
</application>
</manifest>

View File

@ -13,6 +13,7 @@ import com.dzeio.openhealth.BuildConfig
import com.dzeio.openhealth.R
import com.dzeio.openhealth.core.BaseStaticFragment
import com.dzeio.openhealth.databinding.FragmentAboutBinding
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
class AboutFragment : BaseStaticFragment<FragmentAboutBinding>() {
override val bindingInflater: (LayoutInflater, ViewGroup?, Boolean) -> FragmentAboutBinding
@ -32,6 +33,10 @@ class AboutFragment : BaseStaticFragment<FragmentAboutBinding>() {
binding.github.setOnClickListener {
openLink("https://github.com/dzeiocom/OpenHealth")
}
binding.licenses.setOnClickListener {
startActivity(Intent(requireContext(), OssLicensesMenuActivity::class.java))
}
}
private fun openLink(url: String) {

View File

@ -5,6 +5,9 @@ buildscript {
// Safe Navigation
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.5.1")
// OSS licenses
classpath("com.google.android.gms:oss-licenses-plugin:0.10.5")
}
}