darkmoon_uk
09/11/2019, 12:24 AMconfigurations.get("kapt").dependencies.add(DefaultExternalModuleDependency("com.google.dagger", "dagger-compiler", "2.11"))
Paul Woitaschek
09/15/2019, 6:45 AMsettings.gradle
file? I want to change the buildCache dir for all projects (but don't want to add it to the project's settings.gradle
because its completely specific to my build setupegorand
09/16/2019, 3:28 PMvoben
09/16/2019, 7:23 PMlint.gradle
file in my android project which I want to convert to a .kts
file. Here's what the 2 versions look like
// .kts version
android {
lintOptions {
isAbortOnError =true
xmlReport =false
setLintConfig(file("$rootDir/codeQuality/lint.xml"))
}
}
// groovy version
android {
lintOptions {
abortOnError true
lintConfig file("$rootDir/codeQuality/lint.xml")
xmlReport false
}
}
The groovy version works fine but in the kts version I keep getting unresolved reference issues Line 1: android { ^ Unresolved reference: android
. Any ideas on how I can resolve this?Slackbot
09/17/2019, 7:19 AMPaul Woitaschek
09/17/2019, 1:17 PMdebug
, release
, ẁhatever
. I can now declare kapt on one onf these buildTypes kaptDebug(myDependency)
and now when I assemble that build type: module:assembleDebug
it runs kapt.
How does it work when I don't use the android plugin, but only the pure kotlin
plugin. How can I create these build configurations so I get a assembleDebug
? I tried adding `sourceSets`:
sourceSets {
debug
release
}
But that doesn't give me a assembleDebug
taskeddumelendez
09/21/2019, 7:10 AMplugins
block?
buildscript {
...
dependencies {
classpath("org.springframework.cloud:spring-cloud-contract-gradle-plugin:2.2.0.M2")
classpath("org.springframework.cloud:spring-cloud-contract-spec-kotlin:2.2.0.M2")
}
}
Paul Woitaschek
09/24/2019, 9:52 AMryn1x
09/24/2019, 1:06 PMhenrik
09/27/2019, 7:05 AMtasks {
val moduleTest by existing(Test::class) {
setForkEvery(1)
}
}
I'm not able to navigate to the Test
class or to setForkEvery
, and I don't get a list of other methods are available besides setForkEvery
. Is there anything I can do to improve the situation?Xavier F. Gouchet
09/27/2019, 4:00 PMdetekt.gradle
that would apply the same detekt config to all projects needing it.
Now when I try to do that, I can still use the apply(from("path/to/detekt.settings.gradle.kts"))
, but apparently anything I put in the settings script doesn't have the usual imports, and cannot resolve any of the extensions.Imran/Malic
10/01/2019, 9:38 AMzachtib
10/02/2019, 1:15 PMkotlin_version
defined in one place when using gradle kts and buildSrc? I’ve tried having an object inside of buildSrc, but I can’t reference that in buildSrc’s build.gradle.kts
plugin block itself. I’ve tried putting it into gradle.properties and reading it out, which requried a workaround I found on github, but then didn’t work outside of the buildSrc
module. This seems like something there should be a good accepted solution forImran/Malic
10/03/2019, 1:56 PMToolingModelBuilderRegistry
doJoao Birk
10/03/2019, 9:19 PMstepango
10/05/2019, 5:12 AMexec {
// very long operation to get this jar file from somewhere
}
configurations.maybeCreate("default")
artifacts.add("default", file("${libName}.jar"))
But what if I want to do this in execution stage? First problem I faced is I can’t add artifacts lazily and second one is - there is no tasks executed in project (2) by default.
I bit more context is here https://github.com/stepango/bali/blob/master/bazel_wrapper/build.gradle
Any suggestions are welcome.Paul Woitaschek
10/06/2019, 2:10 PMursus
10/09/2019, 4:21 AMursus
10/09/2019, 5:17 AMallprojects {
..
afterEvaluate {
// Apply lintOptions to every android module
def android = it.extensions.findByName("android")
if (android != null) {
android.lintOptions {
lintConfig rootProject.file("lint.xml")
}
}
}
..
}
is there obviously something wrong with it? thanksJustin
10/12/2019, 4:17 PMMatej Drobnič
10/15/2019, 7:41 AMKotlin plugin should be enabled before 'kotlin-kapt'
error message?
I have gradle script like this:
plugins {
kotlin("kapt") version Versions.kotlin
}
subprojects {
kapt {
useBuildCache = true
}
}
Basically, I want to automatically enable build cache on all projects. But since some projects are android and some are regular kotlin, I cannot apply any plugin in this root gradle script, I only need the kapt.Bernhard
10/15/2019, 1:06 PMjmfayard
10/22/2019, 10:03 AMandroid { ... }
block to a separate file app/android.gradle
- Convert the rest of app/build.gradle
to app/build.gradle.kts
- Add in `app/build.gradle.kts`:
apply(from = "android.gradle")
Example here: https://github.com/jmfayard/update-legacy-android-project/commit/a22c3c4cad4f8db7d562bf7313e23f21b7f7c0d4Javier
10/22/2019, 9:32 PMJavier
10/22/2019, 9:46 PMmantono
10/23/2019, 10:25 AMapi
instead of implementation
for a dependency in my library, because my library builds as an extension on top of that library and would not be very usefull without. However, when someone uses my library the dependency declared with api
is not exposed. Is there something I could have done wrong?Sujit
10/24/2019, 5:42 PMrepositories {
maven {
name "Local"
url uri("/Users/sujit.poudel/dev/android/TestProj1/build/")
}
}
can resolve all the artifacts in the build as maven artifacts, but not:
repositories {
maven {
name "Local"
url uri("$projectDir/build/")
}
}
does not in android project? I checked the value of $projectDir
, and it is: /Users/sujit.poudel/dev/android/TestProj1
. Any pointer here please?davidasync
10/25/2019, 5:16 AMmaven {
url "<http://abc.com|abc.com>"
credentials(AwsCredentials) {
accessKey = "a"
secretKey = "b"
sessionToken = "c"
}
}
to kotlin dsl ?Bernhard
10/25/2019, 1:40 PMBernhard
10/25/2019, 1:40 PM