Marc Knaup
02/01/2019, 10:55 AMbuildSrc/build.gradle.kts
plugins {
kotlin("jvm") version "1.3.20"
}
Can I get the Kotlin plugin's version number from within my buildSrc
sources?Marc Knaup
02/01/2019, 3:40 PMapi()
and implementation()
etc. in dependencies {}
resolve and when not?
Line 9: api(project(":fluid-stdlib"))
^ Unresolved reference: api
bjonnh
02/01/2019, 11:08 PMsdeleuze
02/05/2019, 9:25 AMannotationProcessor
configuration, some would assume that it works for both Java and Kotlin but it is not the case, Kotlin users still have to use kapt
configuration. Why can't annotationProcessor
be usable for Kotlin users as well?Davide Giuseppe Farella
02/05/2019, 10:30 AMbuildSrc
I got something like this, for apply my tests dependencies:
fun DependencyHandler.applyTests() = Libs.run {
listOf( test, test_junit, mockk )
.forEach { add("testImplementation", it ) }
}
fun DependencyHandler.applyAndroidTests() = Libs.Android.run {
listOf( espresso, test_runner )
.forEach { add( "androidTestImplementation", it ) }
}
I would also like to create something for apply my android config
through my Android modules, instead of duplicate every time, but com.android.build.gradle.internal.dsl.BaseAppModuleExtension
is part of the android gardle plugin, so it can’t be resolved in my buildSrc
. Is there any way to achieve that?GarouDan
02/05/2019, 10:56 PMbuild.gradle
but not build.gradle.kts
, but maybe I missing something.koufa
02/08/2019, 8:26 PMBuildConfig
to set some variables from the Gradle file. What's the equivalent in a Kotlin Project ?DALDEI
02/08/2019, 8:47 PMGarouDan
02/09/2019, 8:23 PMtask("copyFramework") {
val buildType = (project.findProperty("kotlin.build.type") ?: "DEBUG").toString()
val target = project.findProperty("kotlin.target") ?: "ios"
dependsOn((kotlin.targets["$target"].compilations["main"] as KotlinNativeCompilation).linkTaskName("FRAMEWORK", buildType))
doLast {
val srcFile = (kotlin.targets["$target"].compilations["main"] as KotlinNativeCompilation).getBinary("FRAMEWORK", buildType)
val targetDir = System.getProperty("configuration.build.dir")
copy {
from(srcFile.parent) {
into(targetDir)
include("main.framework/**")
include("main.framework.dSYM")
}
}
}
}
Is this the correct translation?Hiosdra
02/11/2019, 10:47 AMScript '/home/hiosdra/Projects/CessabitAnimator/publish.gradle' line: 20
* What went wrong:
Execution failed for task ':generatePomFileForProductionPublication'.
> Could not apply withXml() to generated POM
> Could not get unknown property 'implementation' for configuration container of type org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.
There is link to actual version of this file - https://github.com/Hiosdra/CessabitAnimator/blob/publish-script/publish.gradlebreskeby
02/11/2019, 3:33 PMbreskeby
02/11/2019, 3:52 PMAndrew Gazelka
02/11/2019, 11:43 PMGarouDan
02/12/2019, 2:29 PM.gradle.kts
instead of .gradle
ones on my project. And I’m having a lot of doubts because of this.
How can I convert this to kts
?
kotlinFrontend {
downloadNodeJsVersion = 'latest'
sourceMaps = true
npm {
dependency "style-loader"
dependency("react")
dependency("react-dom")
devDependency("karma")
}
webpackBundle {
bundleName = "main"
contentPath = file('src/main/web')
}
}
Using something like task("kotlinFrontend") {
don’t work since the inner parts aren’t recognized.GarouDan
02/12/2019, 4:28 PMorg.jetbrains.kotlin.frontend
plugin?Shan
02/12/2019, 4:53 PMShan
02/13/2019, 7:55 PMdependsOn("clean")
in my script, it will only execute for one of the modules.ikej
02/13/2019, 10:17 PMbenjamin
02/14/2019, 3:38 PMrun.jvmArgs("-noverify", "-XX:TieredStopAtLevel=1")
Shan
02/14/2019, 4:24 PMSlackbot
02/15/2019, 4:59 PMlouiscad
02/16/2019, 12:53 AMbuild.gradle.kts
files in a multi-modules project using buildSrc
, but this code relies on some gradle plugins like Kotlin multiplatform and maven publish.
How can I access those in the Kotlin sources of the buildSrc
? Thanks for your help!Shan
02/16/2019, 12:50 PMxenoterracide
02/18/2019, 6:55 PMubu
02/19/2019, 3:05 PMGradle
task from Gitlab CI
.yml
config file? Thanks.Davide Giuseppe Farella
02/21/2019, 2:46 AMbintray-plugin
in my buildSrc
so I don’t need to pass a lambda to the function.
I.e.:
// mymodule.gradle.kts
...
publish( "artifactId" ) {
bintray {
.. copy/paste code using extra's set in buildSrc function
}
}
jacob
02/21/2019, 10:37 AMPaul Woitaschek
02/21/2019, 10:39 AMmp
02/22/2019, 4:08 AMsubprojects { dependencies { implementation(kotlin("stdlib-jdk8")) }}
. However, when I do that, I get this from Gradle: Unresolved reference: implementation
. Playing around with project.the<DependencyHandlerScope>().run { /* stuff here */}
produces the same result. Any ideas?bjonnh
02/25/2019, 8:45 PM