Android 为什么Play Services OSS插件显示maven工件而不是友好的名称?
我决定尝试一下,但遇到了一些我不太明白的事情 插件似乎连接正确,因为我在查看Android 为什么Play Services OSS插件显示maven工件而不是友好的名称?,android,maven,google-play-services,Android,Maven,Google Play Services,我决定尝试一下,但遇到了一些我不太明白的事情 插件似乎连接正确,因为我在查看osslicensesmenuality时看到了 但是看看android上的stock dialer应用程序,他们的OSSLicenseMenuativity看起来是这样的 为什么我的应用程序显示的是maven工件名称,而google的应用程序显示的是格式良好的开放源码库依赖项的披露 以下是gradle脚本的相关部分: 项目级: buildscript { ext.kotlin_version = '1.2.
osslicensesmenuality
时看到了
但是看看android上的stock dialer应用程序,他们的OSSLicenseMenuativity
看起来是这样的
为什么我的应用程序显示的是maven工件名称,而google的应用程序显示的是格式良好的开放源码库依赖项的披露
以下是gradle脚本的相关部分:
项目级:
buildscript {
ext.kotlin_version = '1.2.51'
ext.kotlin_coroutines_version = '0.22.4'
ext.support_lib_version = '27.1.1'
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:3.2.0'
classpath 'com.google.gms:oss-licenses:0.9.2'
classpath 'io.fabric.tools:gradle:1.25.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
模块级(删除某些项目特定的详细信息):
任何洞察都将不胜感激 play services oss许可证库(由您的应用程序使用)的许可证显示功能与拨号器应用程序内部使用的许可证显示功能(我认为您的第二个屏幕截图是指)有微妙的不同。用于显示许可证的plugin+
play services oss许可证
方法还考虑了应用程序的直接依赖关系(例如org.jetbrains.kotlinx.*
),以及Google play services库组件使用的任何oss库(例如com.Google.firebase:firebase core:16.0.1
)
对于您的应用程序对OSS库的直接依赖,我们选择显示完全限定的Maven工件ID,因为这样可以更清楚地了解所使用的库
拨号应用程序显示了更友好的名称,因为谷歌使用的构建系统处理OSS库通知和名称的方式与外部构建系统不同
另一方面,我们计划在不久的将来使oss许可插件开源,这样你就可以自己看看我们在做什么。你的OSSLicenseMenuality和谷歌的OSSLicenseMenuality有什么区别吗?另外,为了理智起见,你清理并重建了项目吗?我正在使用谷歌的。我不是在把它分类。对我已经清理和重建了好几次了。太好了。谢谢可以选择展示什么可能会很酷。也许使用工件ID作为默认值,但是让消费者选择显示更好的名称。也许这比我想象的更难。哦,有趣。谢谢你的链接。
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.oss.licenses.plugin'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "4.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
}
dependencies {
implementation project(':repository')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.android.gms:play-services-oss-licenses:15.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'
implementation "com.android.support:appcompat-v7:$support_lib_version"
implementation "com.android.support:preference-v7:$support_lib_version"
implementation "com.android.support:design:$support_lib_version"
implementation "com.android.support:support-v4:$support_lib_version"
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
implementation 'com.google.dagger:dagger:2.11'
compileOnly 'org.glassfish:javax.annotation:10.0-b28'
kapt 'com.google.dagger:dagger-compiler:2.11'
implementation 'androidx.core:core-ktx:0.3'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation('com.jsibbold:zoomage:1.1.0') {
exclude group: "com.android.support", module: "appcompat-v7"
}
implementation 'com.github.bumptech.glide:glide:4.7.1'
kapt 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'com.jakewharton.timber:timber:4.7.0'
implementation 'com.amplitude:android-sdk:2.14.1'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'