Skip to content

Commit

Permalink
Downgrade MathParser to comply with F-Droid FOSS license rules
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelWuensch committed Feb 24, 2024
1 parent f66d05b commit 646134f
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Expand Up @@ -154,8 +154,8 @@ dependencies {
// Asynchronous programming library
implementation "io.reactivex.rxjava3:rxandroid:3.0.0"

// Math parser for the stealth mode calculator
implementation("org.mariuszgromada.math:MathParser.org-mXparser:5.2.1")
// Math parser for the stealth mode calculator (we have to use the outdated version because of licensing reasons)
implementation("org.mariuszgromada.math:MathParser.org-mXparser:4.4.2")

// Library to react to software keyboard visibility changes
implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:3.0.0-RC3'
Expand Down
Expand Up @@ -66,11 +66,15 @@ protected void onCreate(Bundle savedInstanceState) {
calculate(false);
};

Button[] simpleInputButtons = {btn_1, btn_2, btn_3, btn_4, btn_5, btn_6, btn_7, btn_8, btn_9, btn_0, btn_point, btn_plus, btn_minus, btn_multiply, btn_percent, btn_sqrt, btn_bracket_left, btn_bracket_right};
Button[] simpleInputButtons = {btn_1, btn_2, btn_3, btn_4, btn_5, btn_6, btn_7, btn_8, btn_9, btn_0, btn_point, btn_plus, btn_minus, btn_percent, btn_bracket_left, btn_bracket_right};
for (Button btn : simpleInputButtons) {
btn.setOnClickListener(simpleInputButtonClickListener);
}

// Unfortunately we have to fall back to the more ugly version instead of adding them to the simpleInputButtons as these are not supported in the old 4.4.2 version
btn_multiply.setOnClickListener(view -> addInput("*"));
btn_sqrt.setOnClickListener(view -> addInput("sqrt("));

btn_divide.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Expand Down
96 changes: 82 additions & 14 deletions app/src/main/res/raw/license_report.json
Expand Up @@ -1381,10 +1381,27 @@
],
"dependency": "info.guardianproject:jtorctl:0.4.5.7"
},
{
"project": "KeyboardVisibilityEvent",
"description": "Android Library to handle keyboard visibility change with ease.",
"version": "3.0.0-RC3",
"developers": [
"Yasuhiro Shimizu"
],
"url": "https://github.com/yshrsmz/KeyboardVisibilityEvent",
"year": null,
"licenses": [
{
"license": "The Apache Software License, Version 2.0",
"license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
],
"dependency": "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:3.0.0-RC3"
},
{
"project": "Kotlin Stdlib",
"description": "Kotlin Standard Library for JVM",
"version": "1.8.0",
"version": "1.8.21",
"developers": [
"Kotlin Team"
],
Expand All @@ -1396,12 +1413,12 @@
"license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
],
"dependency": "org.jetbrains.kotlin:kotlin-stdlib:1.8.0"
"dependency": "org.jetbrains.kotlin:kotlin-stdlib:1.8.21"
},
{
"project": "Kotlin Stdlib Common",
"description": "Kotlin Common Standard Library",
"version": "1.8.0",
"version": "1.8.21",
"developers": [
"Kotlin Team"
],
Expand All @@ -1413,12 +1430,12 @@
"license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
],
"dependency": "org.jetbrains.kotlin:kotlin-stdlib-common:1.8.0"
"dependency": "org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21"
},
{
"project": "Kotlin Stdlib Jdk7",
"description": "Kotlin Standard Library JDK 7 extension",
"version": "1.8.0",
"version": "1.8.21",
"developers": [
"Kotlin Team"
],
Expand All @@ -1430,12 +1447,12 @@
"license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
],
"dependency": "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0"
"dependency": "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.21"
},
{
"project": "Kotlin Stdlib Jdk8",
"description": "Kotlin Standard Library JDK 8 extension",
"version": "1.8.0",
"version": "1.8.21",
"developers": [
"Kotlin Team"
],
Expand All @@ -1447,7 +1464,7 @@
"license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
],
"dependency": "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0"
"dependency": "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21"
},
{
"project": "kotlinx-coroutines-android",
Expand Down Expand Up @@ -1519,24 +1536,24 @@
},
{
"project": "MathParser.org-mXparser - Math Expressions Parser / Formula Evaluator library for JAVA Android C# .NET/MONO CLS compliant",
"description": "mXparser is a super easy, rich, fast and highly flexible math expression parser library (parser and evaluator of mathematical expressions / formulas provided as plain text / string). Software delivers easy to use API for JAVA, Android and C# .NET/MONO (Common Language Specification compliant: F#, Visual Basic, C++/CLI). *** If you find the software useful donation or purchase is something you might consider: https://mathparser.org/donate/ *** Online store: https://payhip.com/INFIMA *** Scalar Scientific Calculator, Charts and Scripts, Scalar Lite: https://play.google.com/store/apps/details?id\u003dorg.mathparser.scalar.lite *** Scalar Pro: https://play.google.com/store/apps/details?id\u003dorg.mathparser.scalar.pro *** ScalarMath.org: https://scalarmath.org/ *** MathSpace.pl: https://mathspace.pl/ ***",
"version": "5.2.1",
"description": "mXparser is a super easy, rich, fast and highly flexible math expression parser library (parser and evaluator of mathematical expressions / formulas provided as plain text / string). Software delivers easy to use API for JAVA, Android and C# .NET/MONO (Common Language Specification compliant: F#, Visual Basic, C++/CLI). *** If you find the software useful donation is something you might consider: https://mathparser.org/donate/ *** Scalar Scientific Calculator, Charts and Scripts, Scalar Lite: https://play.google.com/store/apps/details?id\u003dorg.mathparser.scalar.lite *** Scalar Pro: https://play.google.com/store/apps/details?id\u003dorg.mathparser.scalar.pro *** ScalarMath.org: https://scalarmath.org/ *** MathSpace.pl: https://mathspace.pl/ ***",
"version": "4.4.2",
"developers": [
"Mariusz Gromada",
"MathSpace.pl",
"ScalarMath.org",
"Scalar - The Most Advanced Scientific Calculator",
"Scalar Pro - The Most Advanced Scientific Calculator"
],
"url": "https://mathparser.org/",
"url": "http://mathparser.org/",
"year": null,
"licenses": [
{
"license": "DUAL LICENSE",
"license_url": "https://github.com/mariuszgromada/MathParser.org-mXparser/blob/master/LICENSE.txt"
"license": "Simplified BSD License",
"license_url": "https://mathparser.org/mxparser-license/"
}
],
"dependency": "org.mariuszgromada.math:MathParser.org-mXparser:5.2.1"
"dependency": "org.mariuszgromada.math:MathParser.org-mXparser:4.4.2"
},
{
"project": "michaelWuensch/avathor-android-library",
Expand Down Expand Up @@ -1725,6 +1742,57 @@
],
"dependency": "androidx.savedstate:savedstate-ktx:1.2.0"
},
{
"project": "secp256k1 for Kotlin/Multiplatform",
"description": "Bitcoin\u0027s secp256k1 library ported to Kotlin/Multiplatform for JVM, Android, iOS \u0026 Linux",
"version": "0.11.0",
"developers": [
"ACINQ"
],
"url": "https://github.com/ACINQ/secp256k1-kmp",
"year": null,
"licenses": [
{
"license": "Apache License v2.0",
"license_url": "https://www.apache.org/licenses/LICENSE-2.0"
}
],
"dependency": "fr.acinq.secp256k1:secp256k1-kmp-jni-android:0.11.0"
},
{
"project": "secp256k1 for Kotlin/Multiplatform",
"description": "Bitcoin\u0027s secp256k1 library ported to Kotlin/Multiplatform for JVM, Android, iOS \u0026 Linux",
"version": "0.11.0",
"developers": [
"ACINQ"
],
"url": "https://github.com/ACINQ/secp256k1-kmp",
"year": null,
"licenses": [
{
"license": "Apache License v2.0",
"license_url": "https://www.apache.org/licenses/LICENSE-2.0"
}
],
"dependency": "fr.acinq.secp256k1:secp256k1-kmp-jni-common:0.11.0"
},
{
"project": "secp256k1 for Kotlin/Multiplatform",
"description": "Bitcoin\u0027s secp256k1 library ported to Kotlin/Multiplatform for JVM, Android, iOS \u0026 Linux",
"version": "0.11.0",
"developers": [
"ACINQ"
],
"url": "https://github.com/ACINQ/secp256k1-kmp",
"year": null,
"licenses": [
{
"license": "Apache License v2.0",
"license_url": "https://www.apache.org/licenses/LICENSE-2.0"
}
],
"dependency": "fr.acinq.secp256k1:secp256k1-kmp-jvm:0.11.0"
},
{
"project": "Tink Cryptography API for Android",
"description": "Tink is a small cryptographic library that provides a safe, simple, agile and fast way to accomplish some common cryptographic tasks.",
Expand Down
17 changes: 17 additions & 0 deletions app/src/main/res/raw/license_report_fixes.json
Expand Up @@ -15,5 +15,22 @@
}
],
"dependency": "javax.annotation:javax.annotation-api:1.3.2"
},
{
"project": "MathParser.org-mXparser - Math Expressions Parser / Formula Evaluator library for JAVA Android C# .NET/MONO CLS compliant",
"description": "mXparser is a super easy, rich, fast and highly flexible math expression parser library (parser and evaluator of mathematical expressions / formulas provided as plain text / string). Software delivers easy to use API for JAVA, Android and C# .NET/MONO (Common Language Specification compliant: F#, Visual Basic, C++/CLI). *** If you find the software useful donation is something you might consider: https://mathparser.org/donate/ *** Scalar Scientific Calculator, Charts and Scripts, Scalar Lite: https://play.google.com/store/apps/details?id\u003dorg.mathparser.scalar.lite *** Scalar Pro: https://play.google.com/store/apps/details?id\u003dorg.mathparser.scalar.pro *** ScalarMath.org: https://scalarmath.org/ *** MathSpace.pl: https://mathspace.pl/ ***",
"version": "4.4.2",
"developers": [
"Mariusz Gromada"
],
"url": "https://mathparser.org/",
"year": null,
"licenses": [
{
"license": "Simplified BSD License",
"license_url": "https://github.com/mariuszgromada/MathParser.org-mXparser/blob/65928d1674cf9f80370fb6243ef6ada8164a899b/LICENSE.txt"
}
],
"dependency": "org.mariuszgromada.math:MathParser.org-mXparser:4.4.2"
}
]

0 comments on commit 646134f

Please sign in to comment.