https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
gradle
  • r

    Rodrigo Quispe

    07/20/2020, 1:20 PM
    Hello everyone 🙂 , I have a question I can’t generate jar for my kotlin application. And I have a
    build.gradle.kts
    and I expected `build/libs/app-SNAPSHOT.jar`: (The .jar file does not generate for me)
    import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
    
    plugins {
    	id("org.springframework.boot") version "2.2.6.RELEASE"
    	id("io.spring.dependency-management") version "1.0.9.RELEASE"
    	kotlin("jvm") version "1.3.71"
    	kotlin("plugin.spring") version "1.3.71"
    	kotlin("plugin.jpa") version "1.3.71"
    }
    
    group = "com.warlock"
    version = "0.0.1-SNAPSHOT"
    java.sourceCompatibility = JavaVersion.VERSION_11
    
    repositories {
    	mavenCentral()
    }
    
    dependencies {
    	implementation("org.springframework.boot:spring-boot-starter-data-jpa")
    	implementation("org.springframework.boot:spring-boot-starter-data-rest")
    	implementation("org.springframework.boot:spring-boot-starter-web")
    	implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
    	implementation("org.jetbrains.kotlin:kotlin-reflect")
    	implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
    	runtimeOnly("org.postgresql:postgresql")
    	testImplementation("org.springframework.boot:spring-boot-starter-test") {
    		exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
    	}
    }
    
    tasks.withType<Test> {
    	useJUnitPlatform()
    	testLogging.events( "passed", "skipped", "failed", "standardError")
    }
    
    tasks.withType<KotlinCompile> {
    	kotlinOptions {
    		freeCompilerArgs = listOf("-Xjsr305=strict")
    		jvmTarget = "11"
    	}
    }
    n
    3 replies · 2 participants
  • u

    ursus

    07/20/2020, 3:01 PM
    If I want to build an app ("to check if it builds") but not create an apk binary, what do I want? assemble seems to create the apk
    o
    g
    5 replies · 3 participants
  • u

    ursus

    07/20/2020, 3:05 PM
    and -- if it needs to compile the code anyways, is there some palpable time it takes to create the apk?
    g
    1 reply · 2 participants
  • d

    Davide Giuseppe Farella

    07/21/2020, 12:46 PM
    Hello guys, I have a Kotlin-JVM lib published on Bintray ( let’s call it
    myLib
    ) and a Gradle plugin. Plugin got
    myLib
    as dependency and
    example
    is using the Plugin, but I got
    > Failed to apply plugin [id 'studio.forface.easy-publish']
       > Could not create an instance of type studio.forface.easygradle.publish.EasyPublishExtension.
          > Could not generate a decorated class for type EasyPublishExtension.
             > studio/forface/easygradle/internal/ConfigReadWriteProperty
    ConfigReadWriteProperty
    is part of
    myLib
    and
    EasyPublishExtension
    is something like:
    abstract class EasyPublishExtension @Inject constructor(project: Project) {
    
        var username by project("", propertyName = "bintray.user")
        
        private operator fun <T : Any> Project.invoke(
            default: T,
            propertyName: String? = null,
            envName: String? = null
        ) = object : ConfigReadWriteProperty<EasyPublishExtension, T>(
        ....
    
    }
    What is the problem here?
    n
    23 replies · 2 participants
  • f

    Fredy

    07/22/2020, 7:50 AM
    Hello guys, My Build type beta fails on my build-gradle.kts on my Android project with error: BuildType with name ‘beta’ not found.
    g
    9 replies · 2 participants
  • n

    napperley

    07/23/2020, 3:08 AM
    Noticed when trying to upload a Kotlin Native library to Bintray that the version is created but there are no files. What is needed in a build.gradle.kts file to include the missing files?
    s
    m
    6 replies · 3 participants
  • s

    Samyak Jain

    07/23/2020, 5:43 AM
    Hi I need help with the following error:
    This JVM does not support getting OS memory, so no OS memory status updates will be broadcast
    Initialized native services in: /home/samyak/Kotlin/master/kotlin-1.3.30/.gradle/native
    :kotlin-gradle-plugin:compileGroovy FAILED
    :kotlin-gradle-plugin:compileGroovy (Thread[Task worker for ':' Thread 4,5,main]) completed. Took 7.665 secs.
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':kotlin-gradle-plugin:compileGroovy'.
    > android/databinding/tool/LayoutXmlProcessor$OriginalFileLookup has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    
    * Try:
    Run with --debug option to get more log output. Run with --scan to get full insights.
    
    * Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':kotlin-gradle-plugin:compileGroovy'.
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
    	at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
    	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
    FULL LOGS: https://paste.ubuntu.com/p/MsvSXmh9bB/
    o
    16 replies · 2 participants
  • j

    jean

    07/28/2020, 8:24 AM
    How can I convert this to kotlin dsl?
    include ':library'
    project(':library').projectDir = new File(settingsDir, '../MyLibrary/library')
    I don’t find any info on how to set the project path with kotlin
    o
    24 replies · 2 participants
  • v

    Vincent Williams

    07/28/2020, 8:20 PM
    Hey im having some trouble configuring the kotlin compile java version using the kotlin dsl for gradle. I cant seem to find
    kotlinOptions
    . Im using gradle version 6.5
    s
    o
    92 replies · 3 participants
  • d

    David Eriksson

    07/30/2020, 5:52 PM
    Hi, I'm trying Cloudflare workers with Kotlin but they have a traditional build.gradle that I naturally want to convert to .kts The whole file is https://github.com/cloudflare/kotlin-worker-hello-world/blob/master/build.gradle and it is very basic except one crucial hack that merges a string with a file:
    /* Kotlin js output assumes window exists, which it won't on Workers. Hack around it */
    (new File("$projectDir/index.js")).text = "const window=this; " + file("$projectDir/build/distributions/${rootProject.name}.js").getText()
    How do I write this in build.gradle.kts?
    File("$projectDir/index.js").text
    Where .text seem to be some kind of extension to the File object that is not available in Kotlin? PS. I don't know why they use kotlin.target.browser and not target.nodejs but maybe it is to get access to org.w3c.* stuff. Thanks!
    e
    g
    5 replies · 3 participants
  • l

    Loboda Deni

    07/31/2020, 7:20 AM
    Hello, error when trying to use a class from another module:
    e: /home/StudioProjects/sample-multimodule/f_main/src/main/java/com/company/projectName/feature/main/home/HomeViewModel.kt: (4, 39): Unresolved reference: di
    in my vm class:
    package com.company.projectName.feature.main.home
    
    import com.company.projectName.domain.di.DomainModule
    
    class HomeViewModel() : HomeContract.ViewModel {
    
        val x = DomainModule.get()
    }
    I connected the module in dependencies:
    dependencies {
        applyDependencies(depends)
        implementation(project(":domain"))
    }
    and when writing the code, all references to the classes of this module work, but errors occur during assembly. while in the
    app
    module the link to this class works. what do you think could be the problem?
    4 replies · 1 participant
  • l

    Loboda Deni

    07/31/2020, 8:30 AM
    do you think this module structure is normal or are there better options?
    t
    j
    42 replies · 3 participants
  • l

    Lex Luthor

    08/08/2020, 3:15 AM
    After upgrading to Gradle 6.x sometime ago I started to notice that after each and every build of my Kotlin project, Gradle generates Java source folders _unnecessarily_: •
    src/main/java
    •
    src/test/java
    My current configuration is:
    $ ./gradlew -v
    ------------------------------------------------------------
    Gradle 6.5.1
    ------------------------------------------------------------
    
    Build time:   2020-06-30 06:32:47 UTC
    Revision:     66bc713f7169626a7f0134bf452abde51550ea0a
    
    Kotlin:       1.3.72
    Groovy:       2.5.11
    Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
    JVM:          11.0.8 (<http://Amazon.com|Amazon.com> Inc. 11.0.8+10-LTS)
    OS:           Linux 5.4.0-42-generic amd64
    I added the following to my
    build.gradle.kts
    script but had no effect whatsoever:
    sourceSets {
        main {
            java.srcDir("src/main/kotlin")
            resources.srcDir("src/main/resources")
        }
        test {
            java.srcDir("src/test/kotlin")
            resources.srcDir("src/test/resources")
        }
    }
    o
    m
    8 replies · 3 participants
  • g

    Gunslingor

    08/09/2020, 7:10 PM
    Subprojects: They each create a build folder typically and then the parent has a build folder too but mine is essentially empty; I assume there is someway to like, start pulling from subprojects to populate the parent build folder? Does any of this make sense or am I crazy? Trying to find documentation on this or clarity what's really expected.
    o
    9 replies · 2 participants
  • j

    Javier

    08/11/2020, 7:24 AM
    I saw this error multiple times, but I didn't see in the docs we should use
    on
    , it said
    true
    . Is this a typo?
    org.gradle.unsafe.configuration-cache=true
    https://docs.gradle.org/6.6/userguide/configuration_cache.html
    Option configuration-cache doesn't accept value 'true'. Possible values are [OFF, ON, WARN]
    o
    n
    +1
    8 replies · 4 participants
  • h

    Holger Steinhauer [Mod]

    08/11/2020, 12:07 PM
    Hey folks. Is it possible to have different repositories configured for different environments?
    s
    5 replies · 2 participants
  • n

    Nikola Milovic

    08/11/2020, 4:55 PM
    Hey guys, quick question. My Dynamic Modules tests have unresolved reference for Junit. The Dynamic Module build gradle dependencies are just these
    dependencies {
        implementation(project(":core"))
        implementation(project(":app"))
    }
    While my app has
    dependencies {
    ///...
        implementation(project(":core"))
        
        testImplementation(TestLibraryDependency.JUNIT) //neither does this
        addTestDependencies() // this doesn't work
    }
    But rather I have to explicitly add
    testImplementation(TestLibraryDependency.JUNIT)
    to my Dynamic Modules build.gradle What is up with that?
    1 reply · 1 participant
  • c

    Christopher Elías

    08/12/2020, 12:10 AM
    Hello everyone! Im doing a native android app with a feature modularization architecture. But my builds are getting slower and slower... Even thought I already enable caching, parallel and the gradle daemon on gradle.propierties... I think it has something to do with dagger implemented in all the feature modules gradle with "api" instead of "implementation". But if I dont use api, then dagger throw compilation error. Does anyone have experienced something like this? Please help!!
    n
    j
    4 replies · 3 participants
  • d

    Davide Giuseppe Farella

    08/12/2020, 6:26 PM
    Hello, dumb question: I’m on a K-MP project: is it possible to “inject” properties in the compiled code from Gradle? Similarly to what is possible to do on an Android project though
    buildConfigField
    s
    1 reply · 2 participants
  • d

    doodla

    08/12/2020, 7:16 PM
    What’s the difference between
    named()
    and
    getByName()
    ? Seems to be interchangeable in usage. This is in
    NamedDomainObjectCollection.java
    m
    o
    4 replies · 3 participants
  • p

    poohbar

    08/14/2020, 7:38 PM
    how do I do this in Kotlin gradle build file?
    apollo {
      customTypeMapping = [
        "type" : "customType"
      ]
    }
    e
    2 replies · 2 participants
  • a

    atsushi-koshikizawa

    08/15/2020, 3:24 AM
    I'm on a Kotlin Native MPP with Ktor client. Is it possible to switch dependencies automatically by platforms? On Mac requires the client engine for Mac, but on Linux requires it for Linux.
    j
    5 replies · 2 participants
  • s

    spierce7

    08/18/2020, 12:49 PM
    What would be the best way with kotlin script gradle to add the following to every gradle module with the multiplatform plugin applied. I haven't found a way to make the compiler happy using the
    subprojects
    block. Does anyone have any suggestions?
    afterEvaluate {
        kotlin.sourceSets.map {
            it.apply {
                languageSettings.apply {
                    useExperimentalAnnotation("kotlin.ExperimentalStdlibApi")
                    useExperimentalAnnotation("kotlinx.coroutines.FlowPreview")
                    useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi")
                }
            }
        }
    }
    a
    m
    8 replies · 3 participants
  • s

    spierce7

    08/18/2020, 4:33 PM
    Arunkumar helped me get that working, but I can't seem to access the
    kotlin
    extension, and instead I have. to define it. It's ugly, but works. Anyone know of a solution?
    plugins.withType(KotlinMultiplatformPlugin::class) {
            afterEvaluate {
                val kotlin = (this as ExtensionAware).extensions.getByName("kotlin") as org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
                kotlin.sourceSets.map {
                    it.apply {
                        languageSettings.apply {
                            useExperimentalAnnotation("kotlin.ExperimentalStdlibApi")
                            useExperimentalAnnotation("kotlinx.coroutines.FlowPreview")
                            useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi")
                        }
                    }
                }
            }
        }
    s
    4 replies · 2 participants
  • d

    David Eriksson

    08/18/2020, 7:31 PM
    Hi, thanks for the excellent support here last time I had a question. This time I have upgraded my Kotlin plugin to 1.4 in IntelliJ IDEA and when I opened build.gradle.kts in one of my projects I got a question "Enable blabla scripting blabla", which I said OK to. Related or not, but almost every line turned red with errors like:
    Cannot access 'java.lang.Object' which is a supertype of 'org.gradle.kotlin.dsl.KotlinBuildScript'. Check your module classpath for missing or conflicting dependencies
    4 replies · 1 participant
  • d

    darkmoon_uk

    08/19/2020, 12:47 PM
    🤔 Gradle composite builds don't seem to be working as advertised... I'm following the advised pattern of defining a task which 'depends on' another included task e.g.
    dependsOn(gradle.includedBuild("someNamedBuild").task(":build"))
    ...but I get:
    Could not determine the dependencies of task ':build'.
    > Task with path ':build' not found in project ':someNamedBuild'.
    Even though
    build
    is a task in that included build - I can even see it listed if I instead do:
    dependsOn(gradle.includedBuild("someNamedBuild").task(":tasks"))
    ...which successfully lists the available tasks for
    someNamedBuild
    , including
    build
    .
    c
    n
    3 replies · 3 participants
  • s

    Shannon Lloyd

    08/20/2020, 9:48 PM
    Am I correct in my understanding that because
    kotlin-dsl
    in buildSrc bundles its own version of Kotlin (which I believe is currently 1.3.72), it is currently impossible to upgrade a Gradle kotlin project to 1.4.0 if we are also authoring plugins using
    kotlin-dsl
    in buildSrc? We're seeing classpath issues (e.g. NoSuchMethodErrors) relating to still having 1.3.72 on the classpath after upgrading everything to 1.4.0 (we end up with both versions on the classpath). Are we basically stuck on 1.3.72 until Gradle releases a version with a bundled Kotlin 1.4.x?
    :yes: 2
    o
    p
    +1
    47 replies · 4 participants
  • s

    Samyak Jain

    08/22/2020, 7:27 AM
    Hi I have a query
    e: /home/samyak/kotlin/master/kotlin-1.3.30/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/kapt/Kapt3KotlinGradleSubplugin.kt: (302, 38): Type inference failed: Not enough information to infer parameter T in fun <T> emptyList(): List<T>
    Please specify it explicitly.
    
    e: /home/samyak/kotlin/master/kotlin-1.3.30/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/TaskProviderHolder.kt: (25, 59): Unresolved reference: register
    :kotlin-gradle-plugin:compileKotlin FAILED
    I'm unable to rectify upper bits, where is the register method implemented in gradle I checked for • org.gradle.api.Project • org.gradle.api.Task • org.gradle.api.tasks.TaskProvider But had no luck 😕
    i
    1 reply · 2 participants
  • s

    Samyak Jain

    08/22/2020, 7:32 AM
    Link to file or error 1 https://salsa.debian.org/samyak-jn/kotlin-1.3.30/-/blob/master/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/kapt/Kapt3KotlinGradleSubplugin.kt#L302 ^
    i
    1 reply · 2 participants
  • m

    miqbaldc

    08/22/2020, 12:11 PM
    [SOLVED] Does it currently unsupported for Environment Variable to call it using `by project`: https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties
    // env variable inside bash/zsh profile
    
    ORG_GRADLE_PROJECT_foo=bar
    // app/build.gradle.kts
    
    val foo: String? by project
    1 reply · 1 participant
Powered by Linen
Title
m

miqbaldc

08/22/2020, 12:11 PM
[SOLVED] Does it currently unsupported for Environment Variable to call it using `by project`: https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties
// env variable inside bash/zsh profile

ORG_GRADLE_PROJECT_foo=bar
// app/build.gradle.kts

val foo: String? by project
Opened issue here: https://github.com/gradle/gradle/issues/14253
View count: 5