Code Monkey home page Code Monkey logo

Comments (4)

iwarapter avatar iwarapter commented on June 22, 2024

Can you share your build script?

from gradle-sonar-packaging-plugin.

arturbosch avatar arturbosch commented on June 22, 2024

The build file. i also liked the project above.

buildscript {

	repositories {
		mavenCentral()
		mavenLocal()
		jcenter()
		maven { url "http://dl.bintray.com/jetbrains/spek" }
		maven { url "https://plugins.gradle.org/m2" }
	}

	dependencies {
		classpath "org.junit.platform:junit-platform-gradle-plugin:$junitPlatformVersion"
		classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
	}
}

plugins {
	id "com.iadams.sonar-packaging" version "1.0-RC1"
	id "org.sonarqube" version "2.5"
	id "io.gitlab.arturbosch.detekt" version "1.0.0.RC4-3"
}

apply plugin: 'kotlin'
apply plugin: 'jacoco'

group 'io.gitlab.arturbosch.detekt'
version = "$detektSonarVersion"

repositories {
	jcenter()
	mavenLocal()
	mavenCentral()
}

dependencies {
	compile "io.gitlab.arturbosch.detekt:detekt-core:$detektVersion"
	compile "io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion"
	compile "io.gitlab.arturbosch.detekt:detekt-rules:$detektVersion"
	compileOnly "org.sonarsource.sonarqube:sonar-plugin-api:$sonarVersion"
	compile "org.sonarsource.java:java-jacoco:4.11.0.10660"

	testCompile "junit:junit:4.12"
	testCompile "com.nhaarman:mockito-kotlin-kt1.1:$mockitoKotlinVersion"
	testCompile "org.junit.jupiter:junit-jupiter-api:$junitEngineVersion"
	testCompile "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"
	testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
	testCompile "org.assertj:assertj-core:$assertjVersion"
	testCompile "org.jetbrains.spek:spek-api:$spekVersion"
	testCompile "org.jetbrains.spek:spek-subject-extension:$spekVersion"
	testCompile "org.junit.jupiter:junit-jupiter-engine:$junitEngineVersion"
	testRuntime "org.junit.platform:junit-platform-launcher:$junitPlatformVersion"
	testRuntime "org.junit.platform:junit-platform-console:$junitPlatformVersion"
	testRuntime "org.jetbrains.spek:spek-junit-platform-engine:$spekVersion"
}

sourceSets {
	main.java.srcDirs += 'src/main/kotlin'
}


jacocoTestReport {
	dependsOn test
	reports {
		xml.enabled = true
		html.enabled = true
	}
}

check.dependsOn jacocoTestReport

def USER_HOME = System.getProperty("user.home")

sonarPackaging {
	serverUrl = 'http://localhost:9000'
	pluginDir = "$USER_HOME/Downloads/sonarqube-6.4/extensions/plugins"
	pluginKey = 'kotlin'
	pluginClass = 'io.gitlab.arturbosch.detekt.sonar.DetektPlugin'
	pluginName = 'Kotlin'
	pluginDescription = 'Work in progress kotlin sonar plugin.'
	pluginParent = null
	pluginLicense = 'APACHE 2.0'
	requirePlugins = null
	pluginUrl = 'http://github.com/arturbosch/sonar-kotlin'
	pluginIssueTrackerUrl = 'http://github.com/arturbosch/sonar-kotlin/issues'
	pluginTermsConditionsUrl = 'http://github.com/arturbosch/sonar-kotlin'
	pluginSourceUrl = 'http://github.com/arturbosch/sonar-kotlin'
	pluginDevelopers = 'Artur Bosch'
	skipDependenciesPackaging = false
	useChildFirstClassLoader = false
	basePlugin = ''
	sonarQubeMinVersion = '5.6'
}

detekt {
	version = usedDetektGradlePlugin
	profile("main") {
		input = "$project.projectDir"
		filters = '.*/test/.*, .*/resources/.*, .*/build/.*'
		baseline = "$project.projectDir/reports/baseline.xml"
	}
	idea {
		path = "$USER_HOME/.idea"
		codeStyleScheme = "$USER_HOME/.idea/idea-code-style.xml"
		inspectionsProfile = "$USER_HOME/.idea/inspect.xml"
		report = "$project.projectDir/reports"
		mask = "*.kt,"
	}
}
compileKotlin {
	kotlinOptions {
		jvmTarget = "1.8"
	}
}
compileTestKotlin {
	kotlinOptions {
		jvmTarget = "1.8"
	}
}

from gradle-sonar-packaging-plugin.

iwarapter avatar iwarapter commented on June 22, 2024

Which dependency versions did you update? just tried this on current master branch and its built successfully.

from gradle-sonar-packaging-plugin.

arturbosch avatar arturbosch commented on June 22, 2024

As mentioned in the title, if I update the kotlin dependency (try 1.1.60), I get the error.
No on master I did not increment the version. Thanks for your time.

from gradle-sonar-packaging-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.