Skip to content
This repository has been archived by the owner on Sep 17, 2023. It is now read-only.

Commit

Permalink
Remove SSVM, hide editor windows before opening settings, remove rt.j…
Browse files Browse the repository at this point in the history
…ar dependency (removes 65MB from resource download)

Signed-off-by: PranavPurwar <[email protected]>
  • Loading branch information
PranavPurwar committed Aug 29, 2023
1 parent c8edcc0 commit 4ebb5ec
Show file tree
Hide file tree
Showing 25 changed files with 171 additions and 957 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,26 @@ If you find any bugs, please report them on our [Discord server](https://discord
## Features

- Supports Java 17 and Kotlin 2.1 (K2 compiler)
- Plugin support (plugins can be written in Java or Kotlin)
- Git integration
- Fast incremental compilation
- Integrated dependency management
- Accurate code completion for Java and Kotlin
- Code completion for Java and Kotlin
- Syntax highlighting
- Error and warning highlighting directly in the editor
- Sand-boxed program execution with SSVM
- Execution of programs
- Code navigation
- Support for custom fonts and ligatures
- Highly customizable editor
- Google Java Format and ktfmt integration
- Support for plugins
- Highly customizable
- High-performance code editor (Sora Editor)
- Code navigation
- Bytecode Disassembler
- Chat with AI assistants for help with programming
- Backup and restore
- Material You Design
- Modern UI with prebuilt themes
- Dark mode (and light mode)

## Benefits

Expand Down
11 changes: 8 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* This file is part of Cosmic IDE.
* Cosmic IDE is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* Cosmic IDE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with Cosmic IDE. If not, see <https://www.gnu.org/licenses/>.
*/

/*
* This file is part of Cosmic IDE.
* Cosmic IDE is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Expand Down Expand Up @@ -136,9 +143,9 @@ materialThemeBuilder {
dependencies {
implementation("com.android.tools:r8:8.1.56")
implementation("com.android.tools.smali:smali-dexlib2:3.0.3")

//noinspection GradleDependency
implementation("com.github.Cosmic-Ide:DependencyResolver:a9085eb660")
implementation("com.github.xxdark:ssvm:df30743")
implementation("com.google.android.material:material:1.9.0")
implementation("com.google.code.gson:gson:2.10.1")
implementation("com.google.firebase:firebase-analytics-ktx")
Expand All @@ -147,8 +154,6 @@ dependencies {

implementation("com.github.haroldadmin:WhatTheStack:1.0.0-alpha04")

implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.11")

implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.core:core-ktx:1.10.1")
Expand Down
24 changes: 12 additions & 12 deletions app/src/main/kotlin/org/cosmicide/compile/Compiler.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* This file is part of Cosmic IDE.
* Cosmic IDE is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* Cosmic IDE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with Cosmic IDE. If not, see <https://www.gnu.org/licenses/>.
*/

/*
* This file is part of Cosmic IDE.
* Cosmic IDE is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Expand All @@ -16,7 +23,6 @@ import org.cosmicide.build.java.JarTask
import org.cosmicide.build.java.JavaCompileTask
import org.cosmicide.build.kotlin.KotlinCompiler
import org.cosmicide.project.Project
import org.cosmicide.rewrite.common.Prefs

/**
* A class responsible for compiling Java and Kotlin code and converting class files to dex format.
Expand All @@ -43,9 +49,7 @@ class Compiler(
CompilerCache.saveCache(JavaCompileTask(project))
CompilerCache.saveCache(KotlinCompiler(project))
CompilerCache.saveCache(D8Task(project))
if (Prefs.useSSVM) {
CompilerCache.saveCache(JarTask(project))
}
CompilerCache.saveCache(JarTask(project))
}
}

Expand All @@ -58,11 +62,11 @@ class Compiler(
/**
* Compiles Kotlin and Java code and converts class files to dex format.
*/
fun compile() {
fun compile(release: Boolean = false) {
compileKotlinCode()
compileJavaCode()
convertClassFilesToDexFormat()
if (Prefs.useSSVM) {
if (release) {
compileJar()
}
reporter.reportSuccess()
Expand Down Expand Up @@ -117,15 +121,11 @@ class Compiler(
* Converts class files to dex format.
*/
private fun convertClassFilesToDexFormat() {
if (Prefs.useSSVM) {
reporter.reportInfo(context.getString(R.string.skipping_d8_ssvm_enabled))
return
}
compileTask<D8Task>(context.getString(R.string.compiling_class_files_to_dex))
}

sealed class BuildStatus {
object STARTED : BuildStatus()
object FINISHED : BuildStatus()
data object STARTED : BuildStatus()
data object FINISHED : BuildStatus()
}
}

This file was deleted.

Loading

0 comments on commit 4ebb5ec

Please sign in to comment.