maxistar / TextPad

Simple Text Editor for Android
https://texteditor.maxistar.me/
GNU General Public License v3.0
113 stars 21 forks source link

Gradle problem when building from source #47

Closed medanisjbara closed 2 years ago

medanisjbara commented 2 years ago

Hello, I have no experience with gradle and how it works (so this possibly just a user error). I'm trying to build the app from source. (on a fresh Ubuntu 20.10 installation). apt install default-jre git clone $repo cd TextPad ./gradlew lint

and the output is as follows

Welcome to Gradle 6.5!

Here are the highlights of this release:
 - Experimental file-system watching
 - Improved version ordering
 - New samples

For more details see https://docs.gradle.org/6.5/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/root/TextPad/app/build.gradle' line: 4

* What went wrong:
A problem occurred evaluating project ':app'.
> /root/TextPad/local.properties (No such file or directory)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 7m 49s
root # java --version
openjdk 11.0.14.1 2022-02-08
OpenJDK Runtime Environment (build 11.0.14.1+1-Ubuntu-0ubuntu1.21.10)
OpenJDK Server VM (build 11.0.14.1+1-Ubuntu-0ubuntu1.21.10, mixed mode)

which suggests that the source code is missing (to be precise, i believe the first problem is /local.properties in your .gitignore. and the second one is the fact that SDK version is set as an environment variable instead of being present in the code ) or the build instructions on README are not .. informative enough, let's say.

Thank you for your time.

Edit: An important details I didn't mention is that I'm trying this on proot-distro on termux, therefore there's a high chance of that being the problem.

Edit 2: I have just tried the same steps on my archlinux laptop (with every officially supported JVM).

maxistar commented 2 years ago

Hi,there is local.properties.dist in the repo. Rename it to local.properies and your problem should be solved!Best regards,MaxOn Apr 25, 2022 06:42, Med Anis Jbara @.***> wrote: Hello, I have no experience with gradle and how it works (so this possibly just a user error). I'm trying to build the app from source. (on a fresh Ubuntu 20.10 installation). apt install default-jre git clone $repo cd TextPad ./gradlew lint and the output is as follows Welcome to Gradle 6.5!

Here are the highlights of this release:

For more details see https://docs.gradle.org/6.5/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

2: Task failed with an exception.

BUILD FAILED in 7m 49s

which suggests that the source code is missing (to be precise, i believe the first problem is /local.properties in your .gitignore. and the second one is the fact that SDK version is set as an environment variable instead of being present in the code ) or the build instructions on README are not .. informative enough, let's say. Thank you for your time.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

medanisjbara commented 2 years ago

Thanks for the fast reply. Sorry if mine wasn't fast. yes, doing so did work (at least I wasn't stuck at the same problem). Can you please add that as an instruction in the readme file (along with the android-sdk dependency) so that newbies who feel adventurous (like myself) can do this easier. (or maybe point to another doc online that explains so if there is a good one you know of). I'm still unable to compile though, (I wil report as soon as I test this on my archlinux computer). If the problem is unrelated, should I report it here ? Or do I have to open another issue and close this one ?

maxistar commented 2 years ago

Thanks for very good suggestion! I will update the readme asap!Best regards, MaxOn Apr 26, 2022 18:07, Med Anis Jbara @.***> wrote: Thanks for the fast reply. Sorry if mine wasn't fast. yes, doing so did work (at least I wasn't stuck at the same problem). Can you please add that as an instruction in the readme file (along with the android-sdk dependency) so that newbies who feel adventurous (like myself) can do this easier. (or maybe point to another doc online that explains so if there is a good one you know of). I'm still unable to compile though, (I wil report as soon as I test this on my archlinux computer). If the problem is unrelated, should I report it here ? Or do I have to open another issue and close this one ?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

maxistar commented 2 years ago

Added the short note of how to compile an application. I guess it is too short, because I use Android Studion, gradle is only used to compile application in pipeline. Feel free to reopen this issue if you need more information or think that readme should contain it.

medanisjbara commented 2 years ago

Understood, thank you.