dwursteisen
10/09/2018, 8:49 AMsubproject block with a dependencies block inside. We’re trying to call the method compile in it but IntelliJ don’t find it. We missing something but we don’t see what. Have you got any idea about this?
subprojects {
dependencies {
compile("our dependency")
}
}
I presume that something is missing in our scope so compile extension method is not available.tapchicoma
10/09/2018, 8:56 AM"compile"("our dependency")dwursteisen
10/09/2018, 9:03 AMcompile, and so in other part we may use "compile" 😫ribesg
10/09/2018, 9:07 AMimplementation?ribesg
10/09/2018, 9:09 AMcompile does not work properly in kotlin-dsl because kotlin-dsl is new, and compile is an old, long-time deprecated thingtapchicoma
10/09/2018, 9:10 AMtapchicoma
10/09/2018, 9:10 AMclasspath approach leads that you have to use either "compile" or "implementation"Czar
10/09/2018, 9:11 AMcompile should be there if you have java or java-library plugin properly applieddwursteisen
10/09/2018, 9:22 AMbuildscript {
val commit by extra { Git.commit() }
repositories {
mavenLocal()
maven { url = uri("<https://plugins.gradle.org/m2/>") }
maven { url = uri("<https://repo.spring.io/libs-milestone>") }
}
dependencies {
classpath("org.unbroken-dome.gradle-plugins:gradle-testsets-plugin:${Versions.test_sets}")
classpath("com.internal.plugins.OurPlugin:1.2.3")
classpath("org.springframework.boot:spring-boot-gradle-plugin:${Versions.springboot}")
classpath("com.google.protobuf:protobuf-gradle-plugin:${Versions.protobuf_plugin}")
}
}
subprojects {
apply(plugin = "OurPlugin")
tasks.withType(Test::class).configureEach {
reports {
html.isEnabled = false
junitXml.isEnabled = false
}
val processors = Runtime.getRuntime().availableProcessors()
maxParallelForks = when {
(project.name == "web") -> 1
(processors <= 1) -> 1
else -> processors / 2
}
}
dependencies {
"compile"("a_dependency:${Versions.margo_commons}")
}
}dwursteisen
10/09/2018, 9:23 AMOurPlugin apply the plugin kotlin and other plugin but not java or java-library)tapchicoma
10/09/2018, 9:24 AMdependencies {
classpath("org.unbroken-dome.gradle-plugins:gradle-testsets-plugin:${Versions.test_sets}")
classpath("com.internal.plugins.OurPlugin:1.2.3")
classpath("org.springframework.boot:spring-boot-gradle-plugin:${Versions.springboot}")
classpath("com.google.protobuf:protobuf-gradle-plugin:${Versions.protobuf_plugin}")
}
}
to new plugin api: https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_blockCzar
10/09/2018, 9:29 AMbuildscript is deprecated in kotlin-dsl as a plugins configuration mechanism, you have to declare plugins in plugins {} block for static accessors to be generated.gildor
10/09/2018, 10:03 AMgildor
10/09/2018, 10:03 AMNote that if you do not use the plugins {} block to apply your plugins, then you won’t be able to configure the dependency configurations provided by those plugins in the usual way. Instead, you will have to use string literals for the configuration names, which means you won’t get IDE support
dwursteisen
10/09/2018, 10:14 AMNikky
10/09/2018, 10:39 AMribesg
10/09/2018, 10:40 AMgildor
10/09/2018, 10:40 AMNikky
10/09/2018, 10:40 AMgildor
10/09/2018, 10:41 AMNikky
10/09/2018, 10:41 AMpluginManagement {
repositories {
// maven { setUrl("<http://dl.bintray.com/kotlin/kotlin-eap>") }
maven { url = uri("<https://kotlin.bintray.com/kotlinx>") }
mavenLocal()
gradlePluginPortal()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == "kotlinx-serialization") {
useModule("org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:${requested.version}")
}
}
}
}gildor
10/09/2018, 10:41 AMgildor
10/09/2018, 10:41 AMgildor
10/09/2018, 10:42 AMNikky
10/09/2018, 10:43 AMgildor
10/09/2018, 10:44 AMNikky
10/09/2018, 10:54 AMgildor
10/09/2018, 10:57 AMNikky
10/09/2018, 11:04 AMtapchicoma
10/09/2018, 11:04 AMNikky
10/09/2018, 11:05 AMtapchicoma
10/09/2018, 11:05 AMtapchicoma
10/09/2018, 11:06 AMNikky
10/09/2018, 11:07 AMgildor
10/09/2018, 11:09 AMtapchicoma
10/09/2018, 11:09 AMgitRepository("/path/to/git/repo/.git")gildor
10/09/2018, 11:10 AMtapchicoma
10/09/2018, 11:11 AMgildor
10/09/2018, 11:13 AMgildor
10/09/2018, 11:14 AMNikky
10/09/2018, 11:19 AMNikky
10/09/2018, 11:20 AMgildor
10/09/2018, 11:22 AMgildor
10/09/2018, 11:23 AMtapchicoma
10/09/2018, 11:25 AMgildor
10/09/2018, 11:29 AMlocal.settings.gradle that applied in settings.gradle (if local config exists). where you can specify any projects that you want to include also allows to have custom resourceManagement configNikky
10/09/2018, 11:31 AMroot
- plugin
- test-plugin
- libraries + other modulesNikky
10/09/2018, 11:32 AMNikky
10/09/2018, 11:37 AMgildor
10/09/2018, 11:38 AMNikky
10/09/2018, 11:39 AMgildor
10/09/2018, 11:41 AMNikky
10/09/2018, 11:42 AMNikky
10/09/2018, 11:42 AMNikky
10/09/2018, 11:43 AMdependencies {
compile(":plugin")
}
apply {
plugin("plugin")
}Nikky
10/09/2018, 11:43 AMNikky
10/09/2018, 11:44 AMNikky
10/09/2018, 11:49 AMgildor
10/09/2018, 11:53 AMNikky
10/09/2018, 12:08 PMNikky
10/09/2018, 12:08 PMincludeBuild(path to root)Nikky
10/09/2018, 12:09 PMgildor
10/09/2018, 4:26 PM