Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find performanceTesting.jar when building against Android Studio 2024.2.1.2 #1738

Open
pbreault opened this issue Aug 15, 2024 · 2 comments
Labels

Comments

@pbreault
Copy link

What happened?

performanceTesting.jar is not bundled in android studio 2024.2.1.*
This causes a resolution error in :compileKotlin.

Relevant log output or stack trace

Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find /Users/pbreault/.gradle/caches/8.9/transforms/55d0ff1d6fc91e695986202ef9ca3343/transformed/android-studio-2024.2.1.2-mac_arm/plugins/performanceTesting/lib/performanceTesting.jar-242.20224.300.2421.12216002+167.jar (bundledModule:com.jetbrains.performancePlugin:242.20224.300.2421.12216002+167).
     Searched in the following locations:
         file:/Users/pbreault/.gradle/caches/8.9/transforms/55d0ff1d6fc91e695986202ef9ca3343/transformed/android-studio-2024.2.1.2-mac_arm/plugins/performanceTesting/lib/performanceTesting.jar

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Steps to reproduce

1. build.gradle.kts

plugins {
    id("org.jetbrains.kotlin.jvm") version "1.9.24"
    id("org.jetbrains.intellij.platform") version "2.0.1"
}

repositories {
    mavenCentral()
    intellijPlatform {
        defaultRepositories()
    }
}

intellijPlatform {
    pluginConfiguration {
        name = "example"
        group = "com.example"
    }
    buildSearchableOptions.set(false)
    instrumentCode = true
}

java {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

tasks.runIde {
    jvmArgs = listOf("-Xmx4096m", "-XX:+UnlockDiagnosticVMOptions")
}

dependencies {
    intellijPlatform {
        bundledPlugin("org.jetbrains.android")
        instrumentationTools()
        androidStudio("2024.2.1.2")

    }

    testImplementation("junit:junit:4.13.2")
    testImplementation("org.mockito:mockito-core:4.7.0")
    testImplementation("com.google.truth:truth:1.4.4")
}

2. Need at least one Kotlin file to force :compileKotlin to run.

//  src/main/kotlin/com/example/main.kt
println("hello world")

3. Repro

gradle build

Gradle IntelliJ Plugin version

2.0.1

Gradle version

8.9

Operating System

macOS

Link to build, i.e. failing GitHub Action job

No response

@pbreault pbreault added the bug label Aug 15, 2024
@emertozd
Copy link

I extracted that jar from IntelliJ IDEA (2024.2) and placed it in the directory that was causing the error. Until the bug is fixed, this workaround can be used.

@kadorisio-hood
Copy link

This issue is blocking development for plugins built against 2024.2.x.

Was the performanceTesting.jar dependency accidentally included in the AS bundle manifest? It seems to be an Intellij based plugin.

I extracted that jar from IntelliJ IDEA (2024.2) and placed it in the directory that was causing the error. Until the bug is fixed, this workaround can be used.

I was able to use this workaround to get a new version published, but it's unstable and continually fails during development. It's not scalable across teams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants