GithubHelp home page GithubHelp logo

Comments (26)

cgrushko avatar cgrushko commented on September 1, 2024 2

Done (currently under JetBrains review)

from ktfmt.

jef avatar jef commented on September 1, 2024 2

Sorry it's such a mess, I haven't yet figured out how to release the plugin properly, and haven't had the cycles to integrate-test the plugin with multiple IntelliJ versions.

#62 (comment)

I guess that's too new for 193?

All is well. I think I understand the sinceBuild now. Probably doesn't become available until 203*. Not sure if it's needed really. I would be interested in the side effects of removing.

I'm thinking we remove sinceBuild and it would resolve this issue. I can download AS tonight and build it.

from ktfmt.

JavierSegoviaCordoba avatar JavierSegoviaCordoba commented on September 1, 2024 2

After checking this post I think we need to use:

intellij {
    version = "2019.3.4"
}

patchPluginXml {
    sinceBuild("193")
    untilBuild("")
}

from ktfmt.

cgrushko avatar cgrushko commented on September 1, 2024 2

I tried making the plugin work with AS 4.0.1., which is v193, and unfortunately there's too many things to change to make it work.
I uploaded a version of the plugin to JetBrains that runs on v201 and up (Android 4.1, IntelliJ 2020.1 and later) and uses ktfmt 0.19.
If you can't upgrade to Android 4.1, I suggest using the Spotless intergration.

Supporting AS 4.0 is probably a non-trivial amount of work at this point. If anyone's interesting in picking it up, I suggest looking at google-java-format's plugin code at their v1.7 tag.

I'll close this Issue for now, unless anyone thinks it's worth keeping open for documentation purposes?

from ktfmt.

cgrushko avatar cgrushko commented on September 1, 2024 2

Ok, so that works:
AS doesn't show Choose Runtime in its Plugin Marketplace. I was able to download it, install it from disk, and point it at a JetBrains JDK 11.

I'll put it in the release notes, and ask JetBrains to release the update.

tl;dr - the ktfmt plugin works with v201+, which includes Android Studio 4.1.1, as long as it's running under JDK 11.
This is a limitation coming from google-java-format. We can fix GJF to use JDK 8 again.

from ktfmt.

TheSomeshKumar avatar TheSomeshKumar commented on September 1, 2024 1

@cgrushko Okay, I'll see what I can do here.

Just want to mention that Android Studio 4.0.2 (Stable) is version 193.* & we just got a new stable 4.1 update which is version 201.* and the AS 4.2 in the canary branch is 202.*

So I think Android developers won't get version 203 until 2021 Q2. So we need to make this plugin compatible with current AS release.

from ktfmt.

jef avatar jef commented on September 1, 2024 1

Definitely the case. Thanks for the report @TheSomeshKumar. I'll carve in some time tonight.

from ktfmt.

JavierSegoviaCordoba avatar JavierSegoviaCordoba commented on September 1, 2024 1

On macOS -> Runtime version: 11.0.8+10

from ktfmt.

hick209 avatar hick209 commented on September 1, 2024 1

Is this still an issue?

Since it's over 2 years old I'm closing it, but please do reopen in case it is still an issue

from ktfmt.

jef avatar jef commented on September 1, 2024

I believe AS 4.0.1 is build 193.6626763, which should've been covered in the current plugin version 2020.2 (202.7660.17).

That being said #62, may resolve this issue. Could use some testing around it. They don't have a value for AS in https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties, so could be somewhat manual test.

from ktfmt.

cgrushko avatar cgrushko commented on September 1, 2024

I'll publish a new plugin shortly.

from ktfmt.

somesh-basicx avatar somesh-basicx commented on September 1, 2024

@cgrushko Any update on this... I still can't see any plugin on their marketplace.

Android Studio 4.0.2
Build #AI-193.6911.18.40.6821437

from ktfmt.

cgrushko avatar cgrushko commented on September 1, 2024

@somesh-basicx the latest version (1.1.0.18) shows it's compatible with "Android Studio — build 203.4203 — 203.*"
(https://plugins.jetbrains.com/plugin/14912-ktfmt/versions)

I guess that's too new for 193?

Sorry it's such a mess, I haven't yet figured out how to release the plugin properly, and haven't had the cycles to integrate-test the plugin with multiple IntelliJ versions.

Would you be willing to try to build a local copy after playing with the build settings and finding what's needed for AS 4.0.2?

from ktfmt.

alz-ahm avatar alz-ahm commented on September 1, 2024

Any update on this?
I am having a problem installing it on AS 4.1.1.

from ktfmt.

TheSomeshKumar avatar TheSomeshKumar commented on September 1, 2024

@cgrushko Using Android Studio 4.1.1 (Build #AI-201.8743.12.41.6953283) but still can't find ktfmt plugin in the plugin marketplace of Studio 😟

from ktfmt.

cgrushko avatar cgrushko commented on September 1, 2024

@TheSomeshKumar the update is stuck in review - they say there's a problem with the compatibility settings and I'm following up with them.

Meanwhile, try downloading from https://plugins.jetbrains.com/plugin/download?rel=true&updateId=106669 (that's the zip file I uploaded to them) and installing from disk.
Alternatively, clone the repo and run ./gradlew buildPlugin inside the ktfmt_idea_plugin subdirectory. Then, find the resulting .zip file in the build/ subdirectory and install it from disk.

from ktfmt.

TheSomeshKumar avatar TheSomeshKumar commented on September 1, 2024

@cgrushko Thanks for sharing the plugin. After loading the plugin from disk Android Studio doesn't show me any settings to enable the ktfmt plugin anywhere but when I installed the same zip file in the IntelliJ 2020.3 it is showing me appropriate settings.

from ktfmt.

cgrushko avatar cgrushko commented on September 1, 2024

Ugh,

com.intellij.diagnostic.PluginException: While loading class com.facebook.ktfmt.intellij.KtfmtConfigurable: com/facebook/ktfmt/intellij/KtfmtConfigurable 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 [Plugin: com.facebook.ktfmt_idea_plugin] [Plugin: com.facebook.ktfmt_idea_plugin]

This means that ktfmt_idea_plugin was compiled with Java 11 but AS 4.1.1's JRE is Java 8.
We're using 11 because we depend on google-java-format 1.8 which requires Java 11.

Interestingly, the google-java-format has the same problem: it fails to load with the same error.

I'm not sure what to do at this point. I think it might be worth for someone to rewrite the plugin from scratch, possibly in another repo.

from ktfmt.

JavierSegoviaCordoba avatar JavierSegoviaCordoba commented on September 1, 2024

I think 4.2 stable will be released in 2021 Q1 (February = 6 months since 4.1.0), maybe just wait for it.

from ktfmt.

cgrushko avatar cgrushko commented on September 1, 2024

I found google-java-format's parallel issue: google/google-java-format#536

from ktfmt.

JavierSegoviaCordoba avatar JavierSegoviaCordoba commented on September 1, 2024

Have you tried this? google/google-java-format#536 (comment)

If it works the current plugin state should work with that workaround

from ktfmt.

TheSomeshKumar avatar TheSomeshKumar commented on September 1, 2024

Android Studio 4.2 Beta 2 is now available and there will be a Release Candidate sooner than we think... Usually, most android developers update Android Studio as soon as it is available so I don't think supporting version 4.1 is worth the time & efforts.

from ktfmt.

cgrushko avatar cgrushko commented on September 1, 2024

from ktfmt.

JavierSegoviaCordoba avatar JavierSegoviaCordoba commented on September 1, 2024

@cgrushko but I am using ktfmt with AS 4.2 beta with no problems, so it should be using Java 11 I think

from ktfmt.

cgrushko avatar cgrushko commented on September 1, 2024

from ktfmt.

TheSomeshKumar avatar TheSomeshKumar commented on September 1, 2024

Android Studio 4.2 will use Java 11 https://developer.android.com/studio/preview/features/#optimizing_gradle_builds_for_jdk_11

from ktfmt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.