Code Monkey home page Code Monkey logo

Comments (10)

michel-kraemer avatar michel-kraemer commented on July 22, 2024

Can you share a small build script to reproduce the issue? Thanks.

from gradle-download-task.

paulocoutinhox avatar paulocoutinhox commented on July 22, 2024

Sure. It is here:
https://github.com/paulocoutinhox/android-downloader-test

I created a simple empty activity project on Android Studio and add your plugin and error happen.

To make it work, i need change Kotlin from 1.7.21 to 1.7.10 here:
https://github.com/paulocoutinhox/android-downloader-test/blob/main/app/build.gradle#L4

from gradle-download-task.

michel-kraemer avatar michel-kraemer commented on July 22, 2024

The error message says plugin dependency must include a version number for this source. I don't see a version number in your example build script. Did you try to add one?

from gradle-download-task.

michel-kraemer avatar michel-kraemer commented on July 22, 2024

I also found this thread on Stackoverflow here:
https://stackoverflow.com/questions/73657158/gradle-plugin-must-not-include-version

The last comment might be interesting.

from gradle-download-task.

paulocoutinhox avatar paulocoutinhox commented on July 22, 2024

Hi,

It works now with:

KOTLIN_VERSION = "1.7.20"
id "de.undercouch.download" version "5.3.0"

But generate a second problem:

Certificate for <abc.s3.amazonaws.com> doesn't match any of the subject alternative names: [*.s3.amazonaws.com, s3.amazonaws.com]

from gradle-download-task.

paulocoutinhox avatar paulocoutinhox commented on July 22, 2024

I update my sample project to you test if is a plugin bug.

from gradle-download-task.

michel-kraemer avatar michel-kraemer commented on July 22, 2024

I'm not sure what is causing this. It must be some kind of issue with the org.jetbrains.kotlin.android plugin. If I remove this plugin from the main build.gradle file and explicitly specify the version number in the subproject's build file, then everything works correctly:

build.gradle:

plugins {
     id 'com.android.application' version '7.4.0' apply false
     id 'com.android.library' version '7.4.0' apply false
-    id 'org.jetbrains.kotlin.android' version '1.7.21' apply false
+    // id 'org.jetbrains.kotlin.android' version '1.7.21' apply false
 }

app/build.gradle:

plugins {
     id 'com.android.application'
-    id 'org.jetbrains.kotlin.android'
+    id 'org.jetbrains.kotlin.android' version '1.7.21'
     id "de.undercouch.download" version "5.3.0"
 }

Also, if I try to download the file from a simple project that does not include the org.jetbrains.kotlin.android plugin, it also works OK. So, from what I can tell, this is not a bug in gradle-download-task. I suggest filing this issue either in the Gradle repository or in the org.jetbrains.kotlin.android project.

I'm closing this issue, as there is nothing I can do here. Let me know if you need anything else.

from gradle-download-task.

paulocoutinhox avatar paulocoutinhox commented on July 22, 2024

I don't know why it is happening too, but a lot of Java projects have this too, example for aws sdk:
aws/aws-sdk-java-v2#1786

And on Google a lot of problems like this:
https://www.google.com/search?q=javax.net.ssl.SSLPeerUnverifiedException%3A+Certificate+for+.s3.amazonaws.com+doesn%27t+match+any+of+the+subject+alternative+names%3A+%5B*.s3.amazonaws.com%2C+s3.amazonaws.com%5D&oq=javax.net.ssl.SSLPeerUnverifiedException%3A+Certificate+for+.s3.amazonaws.com+doesn%27t+match+any+of+the+subject+alternative+names%3A+%5B*.s3.amazonaws.com%2C+s3.amazonaws.com%5D&aqs=chrome..69i57.11170j0j7&sourceid=chrome&ie=UTF-8

To do a workaround i set:

acceptAnyCertificate true

from gradle-download-task.

prasannjeet avatar prasannjeet commented on July 22, 2024

@paulocoutinhox Facing the same ssl issue. I'm pretty new with gradle and was wondering where must I add your fix so that it works? Thanks!

I'm talking about your last comment:

acceptAnyCertificate true

from gradle-download-task.

paulocoutinhox avatar paulocoutinhox commented on July 22, 2024

Hi @prasannjeet,

I put inside my task. Example:

task downloadUbookLibraryFile(type: Download) {
        src fileURL
        dest new File("mylib.tar.gz")
        tempAndMove true
        onlyIfModified true
        overwrite false
        acceptAnyCertificate true
        downloadTaskDir "/tmp/xyz/cache"
}

from gradle-download-task.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.