spand
05/28/2021, 9:03 AMursus
05/29/2021, 12:37 AMimplementation
dependency is used in a given module? (for all modules; other than obviously trying each one and running build)Nikhil
05/29/2021, 5:27 PMsigning {
useGpgCmd()
sign(publishing.publications["somePublicatioin"])
}
According to documentation I’ve tried setting up the keyName and passphrase in my gradle.properties
https://docs.gradle.org/current/userguide/signing_plugin.html#example_configure_the_gnupgsignatory
signing.gnupg.executable=gpg
signing.gnupg.useLegacyGpg=true
signing.gnupg.keyName=24875D73
signing.gnupg.passphrase=password
But everytime when I’m running ./gradlew publish
, gnupg is asking me to put the passphrase
p.s: I’m using gpg legacyursus
05/29/2021, 6:10 PMRan Magen
05/30/2021, 6:59 PMkotlinx-serialization
to work. I’ve tried any reasonable set up I can think of, but the code fails at runtime saying:
Serializer for class 'SpsRecordIn' is not found.
Mark the class as @Serializable or provide the serializer explicitly.
However:
import kotlinx.serialization.Serializable
...
@Serializable
data class SpsRecordIn(...)
This is in my build.gradle.kts
:
plugins {
application
kotlin("jvm") version "1.5.10"
kotlin("plugin.serialization") version "1.5.10"
}
Can anyone help?rkeazor
05/30/2021, 11:47 PMorg.jetbrains.kotlin. is explictly adding this lib still needed when updating to kotlin 1.5
SrSouza
05/31/2021, 5:54 PMAnthony Nixon
06/01/2021, 12:17 PMmain()
funs except by explicitly creating a gradle task or run config. I'd like to be able to just run through the gutter icon...
IntelliJ IDEA 2021.1.1 (Ultimate Edition)
Build #IU-211.7142.45, built on April 30, 2021
Runtime version: 11.0.10+9-b1341.41 amd64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Linux 5.11.0-7614-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 16
Registry: ide.balloon.shadow.size=0
Non-Bundled Plugins: org.jetbrains.kotlin (211-1.4.32-release-IJ7142.27)
Kotlin: 211-1.4.32-release-IJ7142.27
Current Desktop: pop:GNOME
Ben Madore
06/02/2021, 6:29 PMBen Madore
06/02/2021, 7:13 PMBenjamin Charais
06/02/2021, 8:03 PMjava-gradle-plugin
and I need it to have reference to some of the classes inside of the multiplatform
plugin.
I have the plugin working 100% if I use the kotlin("jvm")
plugin, but as soon as I switch to multiplatform
I get class implementation not found in the plugin, and unzipping the output jar in the gradle cache, has none of the java components, just meta data.
Is anyone aware of how I can override the publishing of the multiplatform targets (atleast one is required) so that it can use the plugin output rather than the multiplatform output? I Only need access to the classes from the multiplatform plugin, no outputs from it itself (or publishing for that matter)ursus
06/03/2021, 2:13 AMplugins {
id 'com.squareup.anvil' version "${latest_version}"
}
to something like
plugins {
ext.plugins.anvil
}
Mr.NiceGuy
06/03/2021, 9:12 AMdave08
06/07/2021, 11:42 AMjava.net.URI
or other basic things like that in my build.gradle.kts? It still seems to work, just the IDE seems to not like something...Piyush Kukadiya
06/08/2021, 3:16 PMefemoney
06/10/2021, 10:18 AMrkeazor
06/10/2021, 1:26 PMnuhkoca
06/10/2021, 4:14 PMprecompiled script
for child Gradle
scripts. How can I add another plugin in such file?
apply<LibraryCommonPlugin>()
configure<BaseExtension> {
defaultConfig {
...
}
}
What I’ve tried;
• to add plugins { kotlin("android") }
on top of file but didn’t work
• to configure like configure<PluginDependenciesSpecScope> { kotlin("android") }
on top of file but didn’t work
What do I need to do to get it to working?MSC
06/10/2021, 11:34 PMid 'com.plugins.my-plugin' version '1.0.0' apply ifEnvVarPresent
I want to apply this plugin only if an particular env var is presentChristian Dräger
06/14/2021, 9:27 AMLaw Gimenez
06/15/2021, 3:05 AMclasspath 'com.android.tools.build:gradle:7.1.0-alpha02'
and this error just won’t go away. I’m trying to compile my project to Arctic Fox and it recommended me to upgrade to build tools version > 7.0. Thanks for the help!mazorius
06/15/2021, 3:41 PMkotlin-dsl
plugin and have no sourceSets.register("…").kotlin {}
I already asked that in Gradle and they give me the following input:
The Groovy plugin (and the other supported ones) now add the source directory set as extension to the source set like
sourceSet.getExtensions().add(GroovySourceDirectorySet.class, "groovy", groovySourceSet.getGroovy());
Due to that the accessor generation for Kotlin DSL build scripts and precompiled plugins can generate theaccessor with which you can configure the source directory set.groovy
So to support Kotlin, the Kotlin Gradle plugin should do the same and add an according extension.
Ben Madore
06/15/2021, 7:52 PMdependencies {
implementation(enforcedPlatform("org.jetbrains.kotlin:kotlin-bom:1.5.10"))
...
}
but when i run gradle dependencies
i see all sorts of nonsense like:
+--- org.jetbrains.kotlin:kotlin-reflect:1.4.31 (*)
+--- org.jetbrains.kotlin:kotlin-bom:1.5.10
| +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.10 -> 1.4.31 (c)
| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.10 -> 1.5.0 (c)
| +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.5.10 -> 1.5.0 (c)
| +--- org.jetbrains.kotlin:kotlin-reflect:1.5.10 -> 1.4.31 (c)
| \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.10 -> 1.5.0 (c)
any suggestions to make this sane. one would think the BOM would be the appropriate approach.dave08
06/16/2021, 3:25 PMimplementation(project(":legacy:domain"))
implementation(project(":domain"))
efemoney
06/19/2021, 10:30 AMorg.jetbrains.kotlin.multiplatform.pm20
Noticed this new plugin and wondering what it’s for? Can anyone from [JB] please enlighten me (Its okay to mention that its for future features or unsupported)Gavin Ray
06/20/2021, 6:59 PM21.2.0-dev JDK16
Quarkus has Kotlin version set to "1.4.32"
and haven't yet merged their PR for upgrading to 1.5
I'm not sure what this error means -- but what is happening is that on first-load, my app is fine.
Then when I save and the in-process recompilation happens, it throws this error:
java.lang.RuntimeException: Unable to invoke Kotlin compiler. java.lang.ExceptionInInitializerError
at com.intellij.pom.java.LanguageLevel.<clinit>(LanguageLevel.java:25)
at com.intellij.core.CoreLanguageLevelProjectExtension.<init>(CoreLanguageLevelProjectExtension.java:26)
at com.intellij.core.JavaCoreProjectEnvironment.<init>(JavaCoreProjectEnvironment.java:42)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreProjectEnvironment.<init>(KotlinCoreProjectEnvironment.kt:26)
Resulted in: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.util.ResourceBundle.setParent(java.util.ResourceBundle) accessible: module java.base does not "opens java.util" to unnamed module @47d9a273
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
... 23 more
at io.quarkus.kotlin.deployment.KotlinCompilationProvider.compile(KotlinCompilationProvider.java:81)
I have googled for some hours, and tried the following (kotlinOptions.jvmTarget
= 11
)
tasks.withType<JavaCompile> {
options.fork(mapOf(Pair("jvmArgs", listOf("--add-opens", "java.base/java.util=ALL-UNNAMED"))))
}
org.gradle.jvmargs=--illegal-access=permit -Dkotlin.daemon.jvm.options=--illegal-access=permit
Is there any way to make this work 🤔spierce7
06/21/2021, 1:48 PMspierce7
06/22/2021, 3:25 AMrun
task of the server), and then kill the running task when the service is closed.
2. Call a command line command from the root project: ./gradlew :server:run
, and then kill it when the service is closed.
Which is the best approach? I’m not even sure if #1 is possible.Tim Schraepen
06/22/2021, 9:53 PMbuildSrc
module, with the kotlin-dsl
convention plugin (as is suggested as a best practice according to the Gradle Docs, but I’ve had quite a bit of issues with these convention plugin scripts not compiling in IntelliJ etc).
I’m using IntelliJ as my IDE, but a normal gradlew clean build
fails on the same compilation error.
e: .../SecurityConfig.kt: (15, 9): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public operator fun <T, R> DeepRecursiveFunction<TypeVariable(T), TypeVariable(R)>.invoke(value: TypeVariable(T)): TypeVariable(R) defined in kotlin
The http: HttpSecurity
function argument to my WebSecurityConfigurerAdapter
impl doesn’t seem to support a configuration lambda.
Any help is appreciated. 🙏Timo Gruen
06/23/2021, 9:37 AMMyClass::class.qualifiedName
at compile time?
As the gradle plugin might not have the dependency at runtime, its still necessary to set a property correctly