commit 57462f2c53b8103073989fdbf8426b95ed205816
parent 3f621c703dfc51c65e9a7ef5a1772570039fc704
Author: Taco <SkytkRSfan3895@gmail.com>
Date: Sat, 2 Feb 2019 15:52:53 -0500
(2/4) update android studio and fastfile, cleanup, set encoding to UTF-8, update and rearrange libraries, add TarsosDSP library version to README
Signed-off-by: Taco <SkytkRSfan3895@gmail.com>
Diffstat:
12 files changed, 58 insertions(+), 97 deletions(-)
diff --git a/.travis.yml b/.travis.yml
@@ -1,21 +1,27 @@
language: android
+
jdk: oraclejdk8
+
android:
components:
- tools
- platform-tools
- tools
- - build-tools-28.0.2
+ - build-tools-28.0.3
- android-28
- extra-android-support
+
+ licenses:
+ - 'android-sdk-license-.+'
+ - 'android-sdk-preview-license-.+'
+ - '.+'
+
before_install:
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
-script: ./gradlew test
-licenses:
- - android-sdk-license-.+
- - android-sdk-preview-license-.+
- - '.+'
-+notifications:
-+ email: false
+
+script: ./gradlew build
+
+notifications:
+ email: false
diff --git a/README.md b/README.md
@@ -1,11 +1,11 @@
[](https://travis-ci.org/gstraube/cythara)
# Cythara
-A musical instrument tuner for Android
+A musical instrument tuner for Android.
-[<img src="https://f-droid.org/badge/get-it-on.png"
+[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid"
- height="80">](https://f-droid.org/app/com.github.cythara)
+ height="80">](https://f-droid.org/packages/com.github.cythara/)
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png"
alt="Get it on Google Play"
height="80">](https://play.google.com/store/apps/details?id=com.github.cythara)
@@ -27,19 +27,21 @@ can be run using `./gradlew connectedCheck`. The reference images are generated
The Tarsos DSP library (https://github.com/JorenSix/TarsosDSP) is used for pitch detection.
+Current library version: commit [c26e500](https://github.com/JorenSix/TarsosDSP/tree/c26e5004e203ee79be1ec25c2603b1f11b69d276)
+
## License
-Cythara is licensed under the GPL, version 3. A copy of the license is included in LICENSE.txt.
+Cythara is licensed under GPLv3. A copy of the license is included in LICENSE.txt.
# Contributors
In chronological order:
-* [mtbu](https://github.com/mtbu) added the violing tuning
+* [mtbu](https://github.com/mtbu) added the violin tuning
* [afmachado](https://github.com/afmachado) provided the translation to Brazilian Portuguese
* [tebriz159](https://github.com/tebriz159) created the logo
* [toXel](https://github.com/toXel) provided the translation to German
-* [TacoTheDank](https://github.com/TacoTheDank) enabled the installation on external storage, upgraded the language level and updated dependencies
-* [thim](https://github.com/thim) added the cello tuning, fixed issues and updated library versions
+* [TacoTheDank](https://github.com/TacoTheDank) enabled the installation on external storage, upgraded the language level, and updated dependencies
+* [thim](https://github.com/thim) added the cello tuning, fixed issues, and updated library versions
* [obibon](https://github.com/obibon) provided the translation to Basque
Thank you all!
diff --git a/app/.gitignore b/app/.gitignore
@@ -1 +0,0 @@
-/build
diff --git a/app/build.gradle b/app/build.gradle
@@ -1,16 +1,16 @@
apply plugin: 'com.android.application'
-apply plugin: 'findbugs'
-
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
+
defaultConfig {
applicationId "com.github.cythara"
minSdkVersion 15
targetSdkVersion 28
versionCode 20
versionName "2.9"
+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
@@ -26,35 +26,29 @@ android {
}
compileOptions {
+ encoding = 'UTF-8'
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
- exclude 'META-INF/proguard/androidx-annotations.pro'
+ exclude 'META-INF/*'
}
}
dependencies {
- androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
-
- androidTestImplementation('com.android.support.test:runner:1.0.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
-
- androidTestImplementation('com.android.support.test:rules:1.0.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
-
+ // Support libraries
implementation 'com.android.support:appcompat-v7:28.0.0'
- implementation 'com.jaredrummler:material-spinner:1.3.0'
- implementation 'com.shawnlin:number-picker:2.4.6'
-
- testImplementation 'junit:junit:4.12'
- testImplementation 'org.hamcrest:hamcrest-all:1.3'
- testImplementation 'org.robolectric:robolectric:3.8'
- testImplementation 'org.powermock:powermock-api-mockito2:1.7.4'
- testImplementation 'org.powermock:powermock-module-junit4:1.7.4'
+
+ // Other
+ implementation 'com.jaredrummler:material-spinner:1.3.1'
+ implementation 'com.shawnlin:number-picker:2.4.7'
+
+ // Testing libraries
+ testImplementation 'junit:junit:4.13-beta-1'
+ testImplementation 'org.hamcrest:hamcrest:2.1'
+ testImplementation 'org.powermock:powermock-api-mockito2:2.0.0'
+ testImplementation 'org.powermock:powermock-module-junit4:2.0.0'
+ androidTestImplementation 'com.android.support.test:rules:1.0.2'
+ androidTestImplementation 'com.android.support.test:runner:1.0.2'
}
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
@@ -1,25 +0,0 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in /home/gst/Android/Sdk/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/app/src/androidTest/java/com/github/cythara/TunerViewTest.java b/app/src/androidTest/java/com/github/cythara/TunerViewTest.java
@@ -134,16 +134,10 @@ public class TunerViewTest {
private void writeToFile(Bitmap bitmap, String name) throws IOException {
File sdCard = Environment.getExternalStorageDirectory();
- FileOutputStream out = null;
- try {
- out = new FileOutputStream(sdCard.getAbsolutePath() + "/" + name);
+ try (FileOutputStream out = new FileOutputStream(sdCard.getAbsolutePath() + "/" + name)) {
bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
} catch (FileNotFoundException e) {
e.printStackTrace();
- } finally {
- if (out != null) {
- out.close();
- }
}
}
@@ -156,4 +150,4 @@ public class TunerViewTest {
this.name = name;
}
}
-}
-\ No newline at end of file
+}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
@@ -8,9 +8,9 @@
<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
+ android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
- android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<activity android:name=".MainActivity">
<intent-filter>
@@ -19,5 +19,4 @@
</intent-filter>
</activity>
</application>
-
-</manifest>
-\ No newline at end of file
+</manifest>
diff --git a/app/src/test/java/com/github/cythara/PitchComparatorTest.java b/app/src/test/java/com/github/cythara/PitchComparatorTest.java
@@ -12,14 +12,10 @@ import org.powermock.modules.junit4.PowerMockRunner;
import java.util.HashMap;
import java.util.Map;
-import static com.github.cythara.tuning.GuitarTuning.Pitch.D3;
-import static com.github.cythara.tuning.GuitarTuning.Pitch.E2;
-import static com.github.cythara.tuning.GuitarTuning.Pitch.E4;
-import static com.github.cythara.tuning.GuitarTuning.Pitch.G3;
+import static com.github.cythara.tuning.GuitarTuning.Pitch.*;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.Matchers.closeTo;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
+import static org.junit.Assert.*;
@RunWith(PowerMockRunner.class)
@PrepareForTest(MainActivity.class)
diff --git a/app/src/test/java/com/github/cythara/SamplerTest.java b/app/src/test/java/com/github/cythara/SamplerTest.java
@@ -83,4 +83,4 @@ public class SamplerTest {
assertThat(note.getName(), either(is(E2.getName())).or(is(B3.getName())));
}
-}
-\ No newline at end of file
+}
diff --git a/build.gradle b/build.gradle
@@ -2,12 +2,12 @@
buildscript {
repositories {
- jcenter()
google()
+ jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.2.1'
+ classpath 'com.android.tools.build:gradle:3.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -16,9 +16,8 @@ buildscript {
allprojects {
repositories {
- jcenter()
google()
- maven { url "https://maven.google.com" }
+ jcenter()
}
}
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
@@ -1,6 +1,6 @@
# Customize this file, documentation can be found here:
# https://docs.fastlane.tools/actions/
-# All available actions: https://docs.fastlane.tools/actions
+# All available actions: https://docs.fastlane.tools/actions/
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
@@ -11,7 +11,7 @@
# This is the minimum version number required.
# Update this, if you use features of a newer version
-fastlane_version "2.69.3"
+fastlane_version "2.115.0"
default_platform :android
@@ -27,14 +27,14 @@ platform :android do
desc "Submit a new Beta Build to Crashlytics Beta"
lane :beta do
- gradle(task: "assembleRelease")
+ gradle(task: "assembleDebug")
crashlytics
# sh "your_script.sh"
# You can also use other beta testing services here
end
- desc "Deploy a new version to the Google Play"
+ desc "Deploy a new version to Google Play"
lane :deploy do
gradle(task: "assembleRelease")
upload_to_play_store
@@ -46,7 +46,7 @@ platform :android do
# This block is called, only if the executed lane was successful
# slack(
- # message: "Successfully deployed new App Update."
+ # message: "Successfully deployed the new app update."
# )
end
@@ -58,8 +58,8 @@ platform :android do
end
end
-# More information about multiple platforms in fastlane: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
-# All available actions: https://docs.fastlane.tools/actions
+# More information about multiple platforms in fastlane: https://docs.fastlane.tools/advanced/lanes/#control-configuration-by-lane-and-by-platform
+# All available actions: https://docs.fastlane.tools/actions/
# fastlane reports which actions are used. No personal data is recorded.
# Learn more at https://docs.fastlane.tools/#metrics
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists