小编kar*_*nod的帖子

带有多模块 gradle 项目的声纳

我有基于 java 和 kotlin 的多模块 gradle 项目。我正在尝试为此设置声纳分析。我在根项目中配置了声纳并使用 CircleCI 运行分析。sonarcloud 中的结果仅针对一个子项目。

我的项目结构如下:

  • 项目A/build.gradle
  • 项目B/build.gradle
  • 项目C/build.gradle
  • 构建.gradle

这是我的根 build.gradle。

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61'
        classpath 'io.spring.gradle:dependency-management-plugin:1.0.9.RELEASE'
        classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.2.4.RELEASE'
        classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7"
    }
}

ext {
    springCloudVersion = 'Hoxton.SR1'
    springBootVersion = '2.2.4.RELEASE'
}

configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

allprojects {
    group = 'com.organiz'
    version = '1.0.0-SNAPSHOT'

    repositories {
        mavenCentral()
        maven {
            //        url ="s3url"  //   only for releases
            url ="s3url"  //  only for snapshots
            credentials(AwsCredentials) {
                accessKey project.accessKey …
Run Code Online (Sandbox Code Playgroud)

java gradle multi-module sonarqube

5
推荐指数
1
解决办法
2268
查看次数

标签 统计

gradle ×1

java ×1

multi-module ×1

sonarqube ×1