https://gradle.com/ logo
Join Slack
Powered by
# gradle-build-server
  • t

    Tanish Ranjan

    07/13/2024, 6:51 PM
    I have addressed the comments in PR#165. Please review.
  • o

    Oleg Nenashev

    07/15/2024, 10:00 AM
    Hi @Tanish Ranjan @Sidhaarth SR. Gentle reminder about the Mid-Term Project demos. If you would like the demos and status updates to be included into the video, which we will also include into the newsletter, I need the videos by tomorrow noon UTC, as well as the slides. Note that such presentation is beneficial for you regardless of the evaluation results, it remains a good way to promote your work and to refer to it in the future in your portfolio.
    t
    • 2
    • 1
  • t

    Tanish Ranjan

    07/16/2024, 4:13 PM
    For android support, if I understand correctly, what needs to be done is to fetch all the sourcesets with the correct claspath for the android project in the build server. Then the rest will be handled by the language server to resolve those sourcesets and provide intellisense.
    👌 1
  • t

    Tanish Ranjan

    07/16/2024, 4:14 PM
    I have created a draft PR for android support.
  • t

    Tanish Ranjan

    07/17/2024, 8:12 AM
    Hey @Donát Csikós @Bálint Hegyi, Could you confirm the priority order in which the Gradle looks for GradleJavaHome? The doc seems to be outdated maybe. I experimented with the tooling api and found the following order: 1.
    gradle.properties
    2. Installed Java (comes from registry maybe) 3. JAVA_HOME (env variable) Or does the tooling api has a different priority order for GradleJavaHome, which I don't think it should be?
    d
    s
    • 3
    • 20
  • t

    Tanish Ranjan

    07/18/2024, 6:45 AM
    Source Sets generated by an Android Project.
    Source Sets.txt
  • t

    Tanish Ranjan

    07/19/2024, 2:58 PM
    I found this in android platform tools repository. Is this the right place look into how agp works and how they have integrated agp into android studio?
    d
    r
    +2
    • 5
    • 13
  • b

    Bálint Hegyi

    07/26/2024, 6:59 AM
    I’ve forgot to send our solution to select the toolchains, most importantly the
    *Supplier
    classes. https://github.com/gradle/gradle/tree/6ddf968ccce4b00c649e6e5c22965b2a37a6dfc6/platforms/jvm/jvm-services/src/main/java/org/gradle/jvm/toolchain/internal
  • b

    Bálint Hegyi

    07/26/2024, 7:01 AM
    I wish we could spin this into a library, as it would be useful for folks like you who might need a JVM in a vacuum, but the solution is rather integrated with Gradle itself
    🙏 2
  • d

    Donát Csikós

    08/01/2024, 12:39 PM
    @Tanish Ranjan @Sheng Chen I think I have a solution to efficiently probe a Gradle build for potential Java incompatibility. Most model builders in The Tooling API will trigger the project configuration, which is not desired for our case. However, there’s a special BuildScopeModelBuilder, which will be built before. Fortunately, we don’t need to implement a custom built scoped model builder as there’s a built-in one:
    GradleBuildBuilder
    . It will run after
    projectsLoaded
    stage, which is effectively after the settings are evaluated. Tl;dr The following snippet is a good probe:
    Copy code
    try (
       ProjectConnection connection = GradleConnector.newConnector()
               .forProjectDirectory(projectDir)
               // ...
               .connect()) {
       connection.getModel(GradleBuild.class);
    } catch (Exception e) {
       // check exception content
    }
    (I've added the same text to our sync notes)
    🙏 2
    t
    • 2
    • 2
  • t

    Tanish Ranjan

    08/01/2024, 12:47 PM
    @Donát Csikós @Sheng Chen Is it safe to conclude from this and this, that the classpaths only exist for each of the variants and not for source sets? (For Android Gradle Projects)
    s
    a
    x
    • 4
    • 20
  • s

    Shah Hitu

    08/05/2024, 8:53 AM
    FAILURE: Build failed with an exception. * What went wrong: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version: project ':audioplayers' -> org.jetbrains.kotlinkotlin gradle plugin1.4.21 Error solution please
    o
    • 2
    • 1
  • a

    Aurimas Liutikas

    08/05/2024, 4:01 PM
    👋 @Oleg Nenashev
  • o

    Oleg Nenashev

    08/06/2024, 6:46 AM
    Thanks for joining @Aurimas Liutikas! FYI @Tanish Ranjan, Aurimas Is probably the best contact to ask about AGP internals and any potential needs and use cases for the integration in Gradle Build Server
    🙏 1
  • t

    Tanish Ranjan

    08/06/2024, 8:25 AM
    Hello Aurimas! Thanks for joining to help us clear our doubts on internal workings of AGP!
  • o

    Oleg Nenashev

    08/06/2024, 8:30 AM
    @Tanish Ranjan thank you for the project page update. I put some initial comments. If you do not want to spend time with iframe sizes and the timesttamps, leave it to me, I will update things in the follow up PR
    t
    • 2
    • 1
  • t

    Tanish Ranjan

    08/07/2024, 12:20 AM
    Recently I was able to extract android build variants for a android project using AGP
    v8.5.1
    like so:
    Copy code
    public static List<AndroidVariant> getAndroidBuildVariants(Project project) {
    
        List<AndroidVariant> androidBuildVariants = new LinkedList<>();
    
        Object androidExtension = getProjectExtension(project, "android");
        if (androidExtension == null) {
          return androidBuildVariants;
        }
    
        AndroidProjectType type = getProjectType(project);
        if (type == null) {
          return androidBuildVariants;
        }
    
        String methodName = "";
        switch (type) {
          case APPLICATION:
          case DYNAMIC_FEATURE:
            methodName = "getApplicationVariants";
            break;
          case LIBRARY:
            methodName = "getLibraryVariants";
            break;
          case INSTANT_APP_FEATURE:
            methodName = "getFeatureVariants";
            break;
          case ANDROID_TEST:
            methodName = "getTestVariants";
            break;
        }
    
        try {
          Set<Object> variants = (Set<Object>) androidExtension.getClass().getMethod(methodName).invoke(androidExtension);
          for (Object variant : variants) {
            AndroidVariant androidVariant = convertToAndroidVariant(project, variant);
            if (androidVariant == null) {
              continue;
            }
            androidBuildVariants.add(androidVariant);
          }
        } catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException | ClassCastException e) {
          // do nothing
          androidBuildVariants.size();
        }
    
        return androidBuildVariants;
    
      }
    Is this the correct approach to get the build variants and is it valid for older versions of agp as well?
    • 1
    • 1
  • t

    Tanish Ranjan

    08/10/2024, 7:16 PM
    @Aurimas Liutikas @Xavier Ducrohet Is the R file generated for a source set or a build variant? I believe it should be generated per build variant as each variant may require different resources that need to be packaged separately. Is that correct? Also how can I get the R file after the AAPT completes the linking?
    a
    x
    • 3
    • 27
  • t

    Tanish Ranjan

    08/12/2024, 9:03 AM
    Source Set Build Process.png,Android Build Process.png
  • b

    braith felisters

    08/13/2024, 7:06 PM
    👋 Hello, team!
    👋 4
  • t

    Tanish Ranjan

    08/17/2024, 7:25 AM
    What is the correct class to use for resolving artifacts like AARs in android build variant using the tooling api? Specifically, what class should be used as the component type in
    createArtifactResolutionQuery()
    for Android library artifacts? In java projects we use
    JvmLibrary
    class to resolve artifacts like JARs. @Xavier Ducrohet @Aurimas Liutikas
    x
    a
    d
    • 4
    • 27
  • o

    Oleg Nenashev

    08/24/2024, 12:08 PM
    @Tanish Ranjan shared initial feedback in https://github.com/gradle/community/pull/65 . When do you actually plan to create the issues? In any case, I suggest duplicating the key possible/required follow-ups in the text of your project page
    👍 1
  • o

    Oleg Nenashev

    08/26/2024, 7:17 AM
    Hi @Sheng Chen. Do you have or do you plan issue templates for Gradle Build Server?
    s
    t
    • 3
    • 8
  • o

    Oleg Nenashev

    08/26/2024, 9:29 AM
    Poll for the GSoC project retrospective all on the week of 9th. Everyone is welcome to participate, I will share a Google Doc for the retro in advance. https://calendly.com/d/ckvd-dfp-d86/android-support-in-gradle-build-server-gsoc-retro
  • p

    Praveen Tss

    09/04/2024, 12:53 AM
    Hi everyone, my gradle build is failing throwing this error
    [Plugin [id: 'org.springframework.boot', version: '2.2.4.Release'] was not found in any of the following sources
    Tried very hard to resolve, but no luck Can someone assist
    o
    • 2
    • 1
  • o

    Oleg Nenashev

    09/04/2024, 6:07 AM
    @Tanish Ranjan for the presentation, did you have a chance to publish the slides somewhere? It might make sense to reference them from the project page. If you use a standard publishing service like Slideshare or Speakerdeck, we can embed them too, same for the PDF
    👍 1
    t
    • 2
    • 2
  • t

    Tanish Ranjan

    09/05/2024, 7:29 PM
    Does AGP provide any mechanism of creating a test module other than the default
    unitTest
    and
    androidTest
    ? @Aurimas Liutikas @Xavier Ducrohet
    a
    x
    • 3
    • 17
  • o

    Oleg Nenashev

    09/09/2024, 4:39 AM
    @Tanish Ranjan to confirm, is it in the draft state? https://github.com/gradle/community/pull/75
    t
    • 2
    • 3
  • t

    Tanish Ranjan

    10/05/2024, 5:37 PM
    Hey @Donát Csikós, I remember you and Sidhaarth discussing during GSoC on integrating Gradle Build Server with Buildship. I would like to work on it, if you are still considering the idea.
    👀 1
    d
    • 2
    • 14
  • h

    Hashem Mudahig

    03/04/2025, 11:33 PM
    * What went wrong: Execution failed for task 'Gjar'.
    Entry FlutterPlugin.class is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/8.10.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.
    d
    • 2
    • 1