Insta360Develop / CameraSDK-Android

Android SDK to control Insta360 cameras
82 stars 9 forks source link

Issue with insecure protocols when upgrading Gradle(v5.6.4 -> v7.2) in SDK Demo #60

Open Wolf00Bomber opened 11 months ago

Wolf00Bomber commented 11 months ago

While going through the gradle upgrade process from v5.6.4 to v7.2, I am facing the following issue:

Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven2(http://nexus.arashivision.com:9999/repository/maven-public/)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details. 

The new gradle v7.2 are asking for secure protocol or HTTPS for the following gradle script, which is a part of the SDK Demo:

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
        maven {
            url 'http://nexus.arashivision.com:9999/repository/maven-public/'
            credentials {
                username = '***'
                password = '***'
            }
        }
    }
}
edimasmic commented 3 months ago

I'm using gradle 7.4 and just add allowInsecureProtocol(true) to the maven

maven {
            url 'http://nexus.arashivision.com:9999/repository/maven-public/'
            credentials {
                username = '***'
                password = '***'
            }
            allowInsecureProtocol(true)
        }