summaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorDavid Rautureau <david.rautureau@sonarsource.com>2018-02-08 15:01:19 +0100
committerDavid Rautureau <david.rautureau@sonarsource.com>2018-03-09 11:33:38 +0100
commit1a17e4302e4b63de6b4ce7c049441803b9471524 (patch)
tree031bcfbf302c7909c5b45a7c31f1bbc00a2fce34 /sonar-core
parent21fbe3697bdb6e66016ef8d0bea49da574e02e7d (diff)
downloadsonarqube-1a17e4302e4b63de6b4ce7c049441803b9471524.tar.gz
sonarqube-1a17e4302e4b63de6b4ce7c049441803b9471524.zip
Move To Gradle
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/build.gradle53
-rw-r--r--sonar-core/pom.xml166
2 files changed, 53 insertions, 166 deletions
diff --git a/sonar-core/build.gradle b/sonar-core/build.gradle
new file mode 100644
index 00000000000..e9cd948163e
--- /dev/null
+++ b/sonar-core/build.gradle
@@ -0,0 +1,53 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Core"
+ }
+}
+
+configurations {
+ includeInResources
+}
+
+dependencies {
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compile 'commons-codec:commons-codec'
+ compile 'org.apache.commons:commons-csv'
+ compile 'org.picocontainer:picocontainer'
+ compile 'com.google.protobuf:protobuf-java'
+ compile 'org.codehaus.sonar:sonar-classloader'
+ compile project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compile 'org.sonarsource.update-center:sonar-update-center-common'
+ compile 'org.slf4j:slf4j-api'
+ compile 'ch.qos.logback:logback-classic'
+ compile 'ch.qos.logback:logback-core'
+
+ includeInResources project(path: ':sonar-plugin-api-deps', configuration: 'shadow')
+
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'org.mockito:mockito-core'
+ testCompile project(':sonar-testing-harness')
+ testCompile 'org.simpleframework:simple'
+ testCompileOnly 'com.google.code.findbugs:jsr305'
+}
+
+// sonar-plugin-api.jar is copied into target JAR file
+processResources {
+ into('/') {
+ from configurations.includeInResources
+ rename '(.*)-' + project.version + '-all.jar', '$1.jar'
+ }
+}
+
+// Used by sonar-db-core to run DB Unit Tests
+artifactoryPublish.skip = false
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/sonar-core/pom.xml b/sonar-core/pom.xml
deleted file mode 100644
index a0e5e0af6ac..00000000000
--- a/sonar-core/pom.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-core</artifactId>
-
- <name>SonarQube :: Core</name>
- <description>Library shared by analyzer and server</description>
-
- <properties>
- <sonar.exclusions>target/generated-sources/**/*,target/generated-test-sources/**/*</sonar.exclusions>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-csv</artifactId>
- </dependency>
- <dependency>
- <groupId>org.picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-classloader</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.update-center</groupId>
- <artifactId>sonar-update-center-common</artifactId>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- </dependency>
-
- <dependency>
- <!-- sonar-api-deps.jar is copied into target JAR file -->
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api-deps</artifactId>
- <version>${project.version}</version>
- <optional>true</optional>
- <scope>runtime</scope>
- </dependency>
-
-
- <!-- tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.simpleframework</groupId>
- <artifactId>simple</artifactId>
- <version>4.1.21</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.basepom.maven</groupId>
- <artifactId>duplicate-finder-maven-plugin</artifactId>
- <configuration>
- <ignoredDependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api-deps</artifactId>
- </dependency>
- </ignoredDependencies>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-deprecated-api-deps</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api-deps</artifactId>
- <destFileName>sonar-plugin-api-deps.jar</destFileName>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.outputDirectory}</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>