Merge pull request #20210 from Homebrew/migrate-casks
[Homebrew/homebrew-cask-versions.git] / Casks / intellij-idea-ce19.rb
blobeacdfd5cdd74e62a16cec9436718691eba473b93
1 cask "intellij-idea-ce19" do
2   version "2019.3.5,193.7288.26"
3   sha256 "9069f23e8dda9307083526c6c438b40cb1858598789c5480040d9345b605d80b"
5   url "https://download.jetbrains.com/idea/ideaIC-#{version.csv.first}.dmg"
6   name "IntelliJ IDEA Community Edition"
7   name "IntelliJ IDEA CE"
8   desc "IDE for Java development - community edition"
9   homepage "https://www.jetbrains.com/idea/"
11   deprecate! date: "2023-12-17", because: :discontinued
13   auto_updates true
14   conflicts_with cask: "intellij-idea-ce"
16   app "IntelliJ IDEA CE.app"
18   uninstall_postflight do
19     ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "idea") }.each do |path|
20       if File.readable?(path) &&
21          File.readlines(path).grep(/# see com.intellij.idea.SocketLock for the server side of this interface/).any?
22         File.delete(path)
23       end
24     end
25   end
27   zap trash: [
28     "~/Library/Application Support/IdeaIC#{version.major_minor}",
29     "~/Library/Caches/IdeaIC#{version.major_minor}",
30     "~/Library/Logs/IdeaIC#{version.major_minor}",
31     "~/Library/Preferences/com.jetbrains.intellij.ce.plist",
32     "~/Library/Preferences/IdeaIC#{version.major_minor}",
33     "~/Library/Saved Application State/com.jetbrains.intellij.ce.savedState",
34   ]
35 end