我正在将声纳分析集成到我的本地android项目中,以使用jacoco生成代码覆盖率报告。为此,我在项目gradle文件中做了以下更改。
项目gradle文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven { url 'http://repo1.maven.org/maven2' }
maven { url 'https://maven.google.com' }
maven { url 'https://mvnrepository.com/artifact/' }
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
//maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:3.0.0'
//classpath "org.sonarsource.scanner.gradle:sonarqube-gradles-plugin:2.6.1"
//classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6-SNAPSHOT'
//classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6-rc1"
// classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.1"
//classpath 'io.fabric.tools:gradle:1.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://mvnrepository.com/artifact/' }
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
flatDir {
dirs 'libs'
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
maven { url 'https://jitpack.io' }
}
}
//apply plugin: 'org.sonarqube'
task clean(type: Delete) {
delete rootProject.buildDir
}
当我从命令提示符运行声纳构建时,它会抛出错误
任务:sonarqube 以下文件缺少归咎信息: * app / src / androidTest / java / com / olam / activities / LoginActivityTest.java * app / src / androidTest / java / com / olam / activities / SplashScreenTest.java * app / src / androidTest / java / olam / com / project / ExampleInstrumentedTest.java * app / src / androidTest / java / olam / com / project / base / AbstractTest.java * app / src / androidTest / java / olam / com / project / base / Condition.java * app / src / main / java / com / olam / activities / LoginActivity.java 这可能会导致SonarQube中的功能丢失/损坏
任何建议或帮助都会令人感激