Skip to content

Commit

Permalink
add license notice for bundled libraries
Browse files Browse the repository at this point in the history
- also upgrade build tools and dependencies
- also remove unused transient dependency volley
-- pulled in by hyperlog to enable pushing logs to a webserver (unused)
-- problematic because license (APL2) is not declared in its POM
  • Loading branch information
ostrya committed Aug 10, 2019
1 parent b12aaa3 commit 38672eb
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 10 deletions.
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
/src/main/assets/open_source_licenses.html
17 changes: 13 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id "com.jaredsburrows.license" version "0.8.42"
}

apply plugin: 'com.android.application'

android {
Expand All @@ -6,8 +10,8 @@ android {
applicationId "org.ostrya.presencepublisher"
minSdkVersion 14
targetSdkVersion 28
versionCode 11
versionName "1.5.2"
versionCode 12
versionName "1.5.3"
}
signingConfigs {
release {
Expand Down Expand Up @@ -36,12 +40,17 @@ android {
buildToolsVersion '28.0.3'
}

afterEvaluate {
preBuild.dependsOn(licenseDebugReport)
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.preference:preference:1.1.0-beta01'
implementation 'androidx.preference:preference:1.1.0-rc01'
implementation('com.hypertrack:hyperlog:0.0.10') {
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support'
exclude group: 'com.android.volley'
}
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.ostrya.presencepublisher.ui;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;

public class LicenseFragment extends Fragment {

public LicenseFragment() {
// Required empty public constructor
}

@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
WebView webView = new WebView(requireActivity());
webView.loadUrl("file:///android_asset/open_source_licenses.html");
return webView;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
Expand Down Expand Up @@ -39,7 +40,7 @@ private static void exportLogs(View view) {
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_log_list, container, false);
RecyclerView recyclerView = view.findViewById(R.id.list);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ public Fragment getItem(int position) {
return new ContentFragment();
case 3:
return new LogFragment();
case 4:
return new LicenseFragment();
}
}

@Override
public int getCount() {
return 4;
return 5;
}

@Nullable
Expand All @@ -49,6 +51,8 @@ public CharSequence getPageTitle(int position) {
return context.getString(R.string.tab_content_title);
case 3:
return context.getString(R.string.tab_log_title);
case 4:
return context.getString(R.string.tab_licenses_title);
}
return null;
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@
<string name="toast_no_logs">Keine Logs vorhanden</string>
<string name="button_reload">Neu laden</string>
<string name="button_clear">Löschen</string>
<string name="tab_licenses_title">Lizenzen</string>
</resources>
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 @@ -61,4 +61,5 @@
<string name="button_clear">Clear</string>
<string name="button_export">Export</string>
<string name="toast_no_logs">No logs available</string>
<string name="tab_licenses_title">Licenses</string>
</resources>
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.android.tools.build:gradle:3.4.2'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip

0 comments on commit 38672eb

Please sign in to comment.