How to use provided scope for jar file in Gradle build?

后端 未结 5 905
情深已故
情深已故 2020-12-03 00:49

I need to use Amazon Maps and Amazon Messaging in my apps.

With gradle, I did not succeed in adding the Amazon dependencies with a \"provided\" scope as they need to

5条回答
  •  生来不讨喜
    2020-12-03 01:21

    There is a prodeps plugin which adds additional optional and provided dependency configurations for Gradle

    ...
    apply plugin: 'propdeps'
    ...
    buildscript {
        repositories {
            maven { url 'http://repo.spring.io/plugins-release' }
        }
        dependencies {
            classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
        }
    }
    ...
    dependencies {
        ...
        provided('android:android:2.2_r3')
        ...
    }
    ...
    

提交回复
热议问题