Skip to content

Commit

Permalink
Show licenses option
Browse files Browse the repository at this point in the history
  • Loading branch information
ligi committed Apr 20, 2018
1 parent 483ef8c commit 997cef3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.google.gms.oss.licenses.plugin'

android {
compileSdkVersion 27
Expand Down Expand Up @@ -65,6 +66,8 @@ dependencies {

implementation 'com.github.kenglxn.QRGen:android:2.4.0'

implementation 'com.google.android.gms:play-services-oss-licenses:15.0.0'

kaptAndroidTest "com.google.dagger:dagger-compiler:$dagger_version"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.net.Uri
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.view.View
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import io.ipfs.kotlin.IPFS
import io.ipfs.kotlin.model.VersionInfo
import kotlinx.android.synthetic.main.activity_main.*
Expand All @@ -16,6 +17,7 @@ import org.ligi.kaxtui.alert
import org.ligi.tracedroid.sending.TraceDroidEmailSender
import javax.inject.Inject


class MainActivity : AppCompatActivity() {

private val ipfsDaemon = IPFSDaemon(this)
Expand Down Expand Up @@ -91,6 +93,11 @@ class MainActivity : AppCompatActivity() {
startActivity(intent)
})


showLicenses.setOnClickListener {
startActivity(Intent(this, OssLicensesMenuActivity::class.java))
}

TraceDroidEmailSender.sendStackTraces("ligi@ligi.de", this)

refresh()
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,11 @@
android:text="@string/button_open_test_links_in_browser"
/>

<Button
android:id="@+id/showLicenses"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_show_licenses"/>


</LinearLayout>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
<string name="button_run_daemon">Run Daemon</string>
<string name="button_stop_daemon">Stop Daemon</string>
<string name="button_open_test_links_in_browser">Open test links in browser</string>
<string name="button_show_licenses">Show FOSS licenses</string>
</resources>
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath "com.google.gms:oss-licenses:0.9.2"
}
}

Expand Down

0 comments on commit 997cef3

Please sign in to comment.