gradle

How to set Gradle environment variables?

为君一笑 提交于 2021-02-08 15:17:08
问题 I'm trying to execute a Gradle command-line task -setupDecompWorkspace to set up Minecraft Forge, but the task gets stuck on decompileMC. I've tried the first solution from this issue, but it didn't work. The second solution suggest setting the GRADLE_OPTS environment variable to -Xmx2G . I don't exactly know how to do this. After searching online for a couple of hours I am still found with no answer. Even the official Gradle documentation doesn't help. Do I need to declare the variable in

How to set Gradle environment variables?

大兔子大兔子 提交于 2021-02-08 15:16:26
问题 I'm trying to execute a Gradle command-line task -setupDecompWorkspace to set up Minecraft Forge, but the task gets stuck on decompileMC. I've tried the first solution from this issue, but it didn't work. The second solution suggest setting the GRADLE_OPTS environment variable to -Xmx2G . I don't exactly know how to do this. After searching online for a couple of hours I am still found with no answer. Even the official Gradle documentation doesn't help. Do I need to declare the variable in

java: cannot access com.google.auth.Credentials class file for com.google.auth.Credentials not found

半城伤御伤魂 提交于 2021-02-08 15:13:34
问题 I'm using the firebase Admin SDK and im getting this error at runtime: Error:(22, 36) java: cannot access com.google.auth.Credentials class file for com.google.auth.Credentials not found This is the constructor that is throwing the error import com.google.auth.oauth2.GoogleCredentials; import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseOptions; import com.google.firebase.database.*; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList;

java: cannot access com.google.auth.Credentials class file for com.google.auth.Credentials not found

久未见 提交于 2021-02-08 15:10:55
问题 I'm using the firebase Admin SDK and im getting this error at runtime: Error:(22, 36) java: cannot access com.google.auth.Credentials class file for com.google.auth.Credentials not found This is the constructor that is throwing the error import com.google.auth.oauth2.GoogleCredentials; import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseOptions; import com.google.firebase.database.*; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList;

kotlin + gradle+ intellij - no repositories are defined

半腔热情 提交于 2021-02-08 14:59:53
问题 anyone can help me out please? i got just project source code and dockefile from ex-colleague without explanation of work but i got in trouble now with time limitation. please please please. i got this error message below Could not determine the dependencies of task ':compileKotlin'. Could not resolve all files for configuration ':kotlinCompilerClasspath'. Cannot resolve external dependency org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.41 because no repositories are defined. that's my

Determine if a task is defined in an external build.gradle file

时光总嘲笑我的痴心妄想 提交于 2021-02-08 13:43:23
问题 I have a gradle task that is created at runtime to call another task ("myOtherTask") which is in a separate gradle file. The problem is if that other task doesn't exist an exception will be thrown. Is it possible to check that a task exists in an external gradle file before attempting to call it? Example: task mainTaskBlah(dependsOn: ':setupThings') task setupThings(){ //... createMyOtherTask(/*...*/) //... } def createMyOtherTask(projName, appGradleDir) { def taskName = projName + 'blahTest'

Android: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

ⅰ亾dé卋堺 提交于 2021-02-08 13:15:22
问题 I am trying to build my project on GitLab CI but unfortunately for me I keep getting this error inside the runner: Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain Now I know there is something wrong with my environment but I just cant get my mind wrapped around the problem. I searched on the web and I found I needed to update my .gitignore file and I did here it is: ### Java ### *.class ### Android ### *.apk *.ap_ ### Package files ### *.war *.ear *.aar ###

IntelliJ IDEA Gradle project not recognizing/locating Antlr generated sources

﹥>﹥吖頭↗ 提交于 2021-02-08 12:21:46
问题 I'm using Antlr in a simple Kotlin/Gradle project, and while my Gradle build is generating Antlr sources, they are not available for importing into the project. As you can see (on the left), the classes (Lexer/Parser, etc.) are being generated. I have also configured this generated-src/antlr/main directory as a Source Root . Most questions I see list this as a solution, but I've already done it. The issue persists after multiple rebuilds (both in IDEA and on the CLI), and following all the

Gradle custom task with java code

佐手、 提交于 2021-02-08 11:51:05
问题 I'm using Gradle, and I need to make some preprocessing on compilation phase. My preprocessor is a class from an external library (a dependency, loaded from Maven Central). How can I wrote such task ? I have code like: buildscript { repositories { maven { url 'http://repo1.maven.org/maven2' } } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' classpath group: 'com.googlecode.htmlcompressor', name: 'htmlcompressor', version: '1.4' } } task compressXML { logging

Minimum Necessary files for an android build

强颜欢笑 提交于 2021-02-08 11:15:27
问题 Trying to find the bare minimum source and build files needed to build an android project in Android Studio. I want to publish to github and avoid uploading generated build files or binaries. I do have a Android.gitignore from but I still see some more files getting pushed into the repo which may not be necessary. I understand the few obvious ones but about others, do I need them and if so kindly explain the usage. So the question, do I need the following and if so then a short description of