yglukhov / nimx

GUI library
MIT License
1.09k stars 75 forks source link

Lift java version => gradle version #388

Closed inv2004 closed 4 years ago

inv2004 commented 4 years ago

Hello, I am trying to build simple android app on windows-10

nimble install nimx
mkdir test_android && cd test_android
echo 'echo "test"' > main.nim
echo 'import nimx/naketools' > nakefile.nim
set ANDROID_NDK_HOME=C:\opt\android-ndk-r20b
set ANDROID_SDK_HOME=C:\opt\sdk-tools-windows-4333796
set SDL_HOME=C:\opt\SDL2-2.0.10

if I use java 13:

set JAVA_HOME=C:\opt\jdk-13.0.1
nake droid

then gradle complains: Could not determine java version from '13.0.1'. The same for '12'. Q: Is it possible to lift gradle to something more modern?

If I use java 7 (which is supported for gradle 4.5)

set JAVA_HOME=C:\opt\java-se-7u75-ri
nake droid

Then there is another problem:

 Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.pom'.
               > java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

something wrong with certificates.

inv2004 commented 4 years ago

update: I lifted gradle to 6.0.1 and it works fine, but looks like there is another problem with sdk and java-13. So, looks like java7,8 are the only options.

yglukhov commented 4 years ago

I've updated gradle wrapper, please retest. Remove build/android dir before retesting.

inv2004 commented 4 years ago

@yglukhov Thank for the great library and fast update.

BTW: there are some binaries in your last commit.

yglukhov commented 4 years ago

BTW: there are some binaries in your last commit

Apparently those are created by gradle wrapper command. Not sure if it's the most correct way. Feel fee to make a proper PR.