rkeazor
09/25/2020, 7:09 AMExerosis
09/26/2020, 3:11 PMiHDeveloper
09/27/2020, 9:48 AMcore
and the other is called other
. The other
project has compileOnly(project(":core"))
in the dependencies. I can code normally and I’m able to reference stuff in core
project using the IDE (IntelliJ).
But, during compileKotlin
task for the project other
. The compiler throws Unresolved reference: stuff
. ☹️
It throws it for the import package from core
project. And, the stuff I referenced in that package.
It seems like the compiler didn’t include core
project in other
during the compilation. I tried to find an answer on the internet.
But, couldn’t find what I’m looking for. I tried to clear the Gradle cache. Also, removed the build
folder. But, both of them didn’t work
What’s the issue? And, how can I solve it? 🤔Slackbot
09/28/2020, 7:07 AMdoodla
09/28/2020, 7:53 PMExerosis
09/28/2020, 11:24 PMRodrigo Silva
09/29/2020, 4:48 PMsteamstreet
10/01/2020, 3:44 AMkotlinOptions.jvmTarget=1.8
to ensure Java 8 compatibility. When I run the build under Java 8, the module builds with a variant that includes "org.gradle.jvm.version": 8
. However, if I run the same build under Java 11, the variant changes to 11. If I am building a library using Java 11 that I want to support Java 8, how do I do this? My understanding was that setting kotlinOptions.jvmTarget=1.8
should have ensured that the variant was set to 8.David Miguel
10/03/2020, 1:44 PMbuildSrc
module. However I cannot access implementation()
, kapt()
, etc extensions functions that are declared in the package org.gradle.kotlin.dsl
from the gradle-kotlin-dsl-accessors
artifact. Is it possible to have access to them from my buildSrc
module? Thanks for you help.Philipp Mayer
10/05/2020, 3:44 PMsrcDir("src/routes/a")
srcDir("src/routes/a/asdf")
srcDir("src/routes/b")
srcDir("src/routes/c/xyz/zyx")
Right now, if I add a new directory under route, I have to add it also to my build.gradle.kts
in the given snippet.
Is there a way to accomplish that automatically, by adding all sub directories of src/routes
?
Thanks in advance!Davide Giuseppe Farella
10/08/2020, 4:00 PMroot
( modules )
+ gradle
( plugins )
+ publish
- libraries ( plugin )
- plugins ( plugin )
The goal is to have
// root
plugins {
id("publish-libraries")
}
// gradle
plugins {
id("publish-plugins")
}
The problem is that if I apply publish-plugins
to gradle
project or one of its module , root does not find the plugins in gradle
😕
org.gradle.internal.exceptions.LocationAwareException: Build file '/Users/davide/Dev/Android/Workspace/xxx/build.gradle.kts' line: 28
Plugin [id: 'my-plugin'] was not found in any of the following sources:
( The gradle
project builds correctly though )ephemient
10/08/2020, 10:11 PMrnentjes
10/09/2020, 11:46 AMsultanofcardio
10/12/2020, 5:34 PMimport java.nio.file.Files
import java.nio.file.StandardCopyOption
import java.util.concurrent.TimeUnit
plugins {
id("idea")
kotlin("jvm") version "1.4.10"
IDEA is unable to parse the file and highlights everything in red. Running a gradle task from the terminal works fine though. When I remove the import statements and put the plugins
block at the top, the script is parsed correctly but the unimported classes cannot be resolved.
Am I doing this incorrectly or is this an IDEA bug?ursus
10/13/2020, 3:42 AMursus
10/13/2020, 3:44 AMursus
10/13/2020, 3:50 AMapply
to include my other .gradle files?ursus
10/13/2020, 4:34 AMRohit
10/14/2020, 8:09 AMJérôme Gully
10/14/2020, 9:03 AMincludeBuild
to consume a library module that is not in the same path as the app project:
App project/projects/myApp/
App module/projects/myApp/myModuleApp/
LibProject/projects/myLib
I want to inculdeLibModule/projects/myLib/myModuleLib
myModuleLib
in myModuleApp
as a dependency.
I tried to create a new project app and a new project for the library (create new module android lib), and in settings.gradle from the app project I have added includeBuild("../LibProject/mylibrary")
but it's not working. Maybe I have missed something, the error is:
Plugin [id: 'com.android.library'] was not found in any of the following sources:
Big Chungus
10/14/2020, 3:39 PMbjonnh
10/15/2020, 10:53 PMConorG
10/16/2020, 5:53 AMvectorDrawables.useSupportLibrary
. My builds fail in with 4.1 due to issues with
Caused by: org.gradle.api.GradleException: Can't process attribute android:strokeColor="@color/white": references to other resources are not supported by build-time PNG generation. File was preprocessed as vector drawable support was added in Android 5.0 (API level 21) See <http://developer.android.com/tools/help/vector-asset-studio.html> for details.
After some googling, it seems this is the stacktrace that showed when ``vectorDrawables.useSupportLibrary`` wasn’t declared (but it definitely is). Rolling back to 4.0.1 builds fine.ciscorucinski
10/16/2020, 12:51 PMval pluginGroup: String by project
This will search for .property files for the key pluginGroup
and return it's value as a String
. I am impressed by that, but how the heck does this magic work?
This will only return String
values, so even if we have the following in the .properties file...
platformDownloadSources = true
It will still only return "true"
as a String
.
I am curious of how this mechanism works and why it is limited to only String
and why it is limited to the specific name I have for the variable. Meaning I must name my variable the same as is in the .properties file.
This is something that I know works, but I just can't comprehend it.
For background:
To see this in usage, head over to GitHub: JetBrains/intellij-platform-plugin-template
Here is gradle.properties and here is build.gradle.ktsTower Guidev2
10/16/2020, 3:03 PMgradle
build (used to work fine) employs
classpath 'org.ajoberstar:grgit:1.9.3'
To open the associated git repo
When I refresh gradle and/or clean or build I get this error
* What went wrong:
A problem occurred evaluating root project 'main-app'.
> repository not found: /Users/rossUlbricht/.gradle/daemon/sub-module/.git
Why is GrGit
looking in the /.gradle/daemon/ folder for my repo?
How do I configure gradle to enable it to correctly locate my sub module folder location?
I have just upgraded Android Studio to
Android Studio 4.1
Build #AI-201.8743.12.41.6858069, built on September 23, 2020
Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.6
and using
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'org.ajoberstar:grgit:1.9.3'
// in the individual module build.gradle files
}
with
#Tue Jun 05 12:01:24 BST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\:<//services.gradle.org/distributions/gradle-5.1.1-all.zip>Big Chungus
10/16/2020, 3:27 PMkotlin.style=official
gradle prop does?Christopher Elías
10/19/2020, 1:16 PMursus
10/20/2020, 1:18 AMParameter specified as non-null is null: method com.android.build.gradle.BaseExtension.compileSdkVersion, parameter version
android {
compileSdkVersion compileSdk
defaultConfig {
minSdkVersion minSdk.o2
targetSdkVersion targetSdk
...
ext {
compileSdk = 29
...
It's worked before the updatePaul Woitaschek
10/20/2020, 8:26 AMbitkid
10/20/2020, 9:55 AMmaven-publish
}
everything works so far .. the only thing is it uses an old kotlin version. how can i force it to 1.4.10 for everything (buildsrc and sub modules). as soon as i put a version somewhere (in my root build.gradle.kts as an example) i get the error message "Plugin request for plugin already on the classpath must not include a version". any ideas?bitkid
10/20/2020, 9:55 AMmaven-publish
}
everything works so far .. the only thing is it uses an old kotlin version. how can i force it to 1.4.10 for everything (buildsrc and sub modules). as soon as i put a version somewhere (in my root build.gradle.kts as an example) i get the error message "Plugin request for plugin already on the classpath must not include a version". any ideas?embedded-kotlin
and kotlin-dsl
plugins rely on features of Kotlin 1.3.72
that might work differently than in the requested version 1.4.10
."Javier
10/20/2020, 10:13 AMbitkid
10/20/2020, 10:16 AMJavier
10/20/2020, 10:21 AMbitkid
10/20/2020, 10:27 AM$ ./gradlew init
Select type of project to generate:
1: basic
2: application
3: library
4: Gradle plugin
Enter selection (default: basic) [1..4] 2
Select implementation language:
1: C++
2: Groovy
3: Java
4: Kotlin
5: Scala
6: Swift
Enter selection (default: Java) [1..6] 4
Split functionality across multiple subprojects?:
1: no - only one application project
2: yes - application and library projects
Enter selection (default: no - only one application project) [1..2] 2
Select build script DSL:
1: Groovy
2: Kotlin
Enter selection (default: Kotlin) [1..2] 2
Project name (default: tmpGradle): test
Source package (default: test):
Javier
10/20/2020, 11:12 AMbitkid
10/20/2020, 12:06 PM$ ./gradlew build
> Task :buildSrc:compileKotlin
The `kotlin-dsl` plugin applied to project ':buildSrc' enables experimental Kotlin compiler features. For more information see <https://docs.gradle.org/6.7/userguide/kotlin_dsl.html#sec:kotlin-dsl_plugin>
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
C:/Users/sadatgus/.gradle/wrapper/dists/gradle-6.7-bin/efvqh8uyq79v2n7rcncuhu9sv/gradle-6.7/lib/kotlin-stdlib-1.3.72.jar (version 1.3)
C:/Users/sadatgus/.gradle/wrapper/dists/gradle-6.7-bin/efvqh8uyq79v2n7rcncuhu9sv/gradle-6.7/lib/kotlin-stdlib-common-1.3.72.jar (version 1.3)
C:/Users/sadatgus/.gradle/wrapper/dists/gradle-6.7-bin/efvqh8uyq79v2n7rcncuhu9sv/gradle-6.7/lib/kotlin-stdlib-jdk7-1.3.72.jar (version 1.3)
C:/Users/sadatgus/.gradle/wrapper/dists/gradle-6.7-bin/efvqh8uyq79v2n7rcncuhu9sv/gradle-6.7/lib/kotlin-stdlib-jdk8-1.3.72.jar (version 1.3)
C:/Users/sadatgus/.gradle/wrapper/dists/gradle-6.7-bin/efvqh8uyq79v2n7rcncuhu9sv/gradle-6.7/lib/kotlin-reflect-1.3.72.jar (version 1.3)
C:/Users/sadatgus/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.3.72/916d54b9eb6442b615e6f1488978f551c0674720/kotlin-stdlib-jdk8-1.3.72.jar (version 1.3)
C:/Users/sadatgus/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.4.10/e2b3c6695eee6085e606d96d685396dce23a3a06/kotlin-reflect-1.4.10.jar (version 1.4)
C:/Users/sadatgus/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.3.72/3adfc2f4ea4243e01204be8081fe63bde6b12815/kotlin-stdlib-jdk7-1.3.72.jar (version 1.3)
C:/Users/sadatgus/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.10/ea29e063d2bbe695be13e9d044dcfb0c7add398e/kotlin-stdlib-1.4.10.jar (version 1.4)
C:/Users/sadatgus/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.4.10/6229be3465805c99db1142ad75e6c6ddeac0b04c/kotlin-stdlib-common-1.4.10.jar (version 1.4)
w: Consider providing an explicit dependency on kotlin-reflect 1.4 to prevent strange errors
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
Javier
10/20/2020, 12:15 PMbitkid
10/20/2020, 8:10 PM