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

Improve Cosmic-Ide #151

Merged
merged 4 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .idea/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/compiler.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/google-java-format.xml

This file was deleted.

35 changes: 0 additions & 35 deletions .idea/jarRepositories.xml

This file was deleted.

102 changes: 45 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,87 @@
# Cosmic IDE
![CI](https://github.com/Cosmic-Ide/Cosmic-Ide/actions/workflows/android.yml/badge.svg)
[![IzzyOnDroid](https://img.shields.io/endpoint?url=https://apt.izzysoft.de/fdroid/api/v1/shield/com.pranav.java.ide)](https://apt.izzysoft.de/fdroid/index/apk/com.pranav.java.ide)
[![Chat on Discord](https://img.shields.io/badge/Chat-on%20discord-7289da)](https://discord.gg/8Gu6YCq2eS)
[![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/Cosmic-Ide/Cosmic-Ide/blob/main/LICENSE)

<p align="center">
<img src="https://raw.githubusercontent.com/Cosmic-Ide/Cosmic-Ide/main/art/icon.png">

<br>
<a href="https://apt.izzysoft.de/fdroid/index/apk/com.pranav.java.ide">
<img src="https://img.shields.io/badge/IzzyOnDroid-v0.0.5-blue">
</a>

<a href="https://github.com/Cosmic-Ide/Cosmic-Ide/actions/workflow/android.yaml">
<img src="https://img.shields.io/badge/Android%20CI-passing-blue">
</a>

<a href="https://discord.gg/8Gu6YCq2eS">
<img src="https://img.shields.io/badge/Chat-on%20discord-7289da">
</a>
<a href="https://github.com/Cosmic-Ide/Cosmic-Ide/blob/main/LICENSE">
<img src="https://img.shields.io/badge/License-GPLv3-blue.svg">
</a>
<p>
# Cosmic IDE

A next-gen Ide for JVM development on Android!

## How to get
Overview
---

<img src="https://raw.githubusercontent.com/Cosmic-Ide/Cosmic-Ide/main/art/icon.png" align="right" width="40%" height="40%"></img>

<div style="display:flex;">

- Java 17
- Kotlin Language Support
- Javac, Javap, D8
- Eclipse Compiler for Java (ECJ)
- Incremental Compilation
- Eclipse class disassembler
- Execute Java Code
- Error/Warning marker in editor
- Code highlighting
- Add Classpath
- Decompile Class File
- Google Java Formatter
- Eclipse Java Formatter
- Baksmali Dex File
- Basic Java Keywords auto-completion

</div>
<p>

Downloads
---

The app is available on F-Droid through [IzzyOnDroid](https://apt.izzysoft.de/fdroid) repository [here](https://apt.izzysoft.de/fdroid/index/apk/com.pranav.java.ide)
[<img alt="Get it on IzzyOnDroid" height="80" src="https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png">](https://apt.izzysoft.de/fdroid/index/apk/com.pranav.java.ide)

You can get the latest release from [here](https://github.com/Cosmic-Ide/Cosmic-Ide/releases/v0.0.5)
You can get the latest release from [here](https://github.com/Cosmic-Ide/Cosmic-Ide/releases/v0.0.5)
and the latest debug build from [Github Actions](https://github.com/Cosmic-Ide/Cosmic-Ide/actions).

## Screenshots
Screenshots
---

<p align="center">

<img width="125" height="250" src="https://raw.githubusercontent.com/Cosmic-Ide/Cosmic-Ide/main/art/img/editor.png">

<img width="125" height="250" src="https://raw.githubusercontent.com/Cosmic-Ide/Cosmic-Ide/main/art/img/diagnostic.png">

<img width="125" height="250" src="https://raw.githubusercontent.com/Cosmic-Ide/Cosmic-Ide/main/art/img/run.png">

<img width="125" height="250" src="https://raw.githubusercontent.com/Cosmic-Ide/Cosmic-Ide/main/art/img/settings.png">

<img width="125" height="250" src="https://raw.githubusercontent.com/Cosmic-Ide/Cosmic-Ide/main/art/img/javap.png">

<img width="125" height="250" src="https://raw.githubusercontent.com/Cosmic-Ide/Cosmic-Ide/main/art/img/smali.png">

<img width="125" height="250" src="https://raw.githubusercontent.com/Cosmic-Ide/Cosmic-Ide/main/art/img/decompiler.png">

<img width="125" height="250" src="https://raw.githubusercontent.com/Cosmic-Ide/Cosmic-Ide/main/art/img/treeview.png">

</p>

## Features

- \[x\] Java 17
- \[x\] Kotlin Language Support
- \[x\] Javac
- \[x\] Javap
- \[x\] Eclipse Compiler for Java (ECJ)
- \[x\] Incremental Compilation
- \[x\] Eclipse class disassembler
- \[x\] Execute Java Code
- \[x\] Error/Warning marker in editor
- \[x\] Code highlighting
- \[x\] Add Classpath
- \[x\] Decompile Class File
- \[x\] Google Java Formatter
- \[x\] Eclipse Java Formatter
- \[x\] Baksmali Dex File
- \[x\] Basic Java Keywords auto-completion
- \[x\] D8
- \[x\] File Tree Viewer
- \[x\] Completely offline

## TO-DO
TO-DO
---

- \[ \] Java auto-complete server

## Building
Building
---

Clone this repository on your device and compile using Android Studio or by running the command

```sh
./gradlew assembleDebug
```

## Contributing
Contribution
---

We would really appreciate all kinds of contributions.
If you have any questions, ideas, need help or want to propose a change just open an issue.

- Any type of contributions are highly appreciated.
- Create a pull request and we'll merge it after review.

## Special thanks to
Special Thanks
---

- [TheWolf](https://github.com/thewolfprod)

Expand Down
21 changes: 10 additions & 11 deletions android-compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
Expand All @@ -26,16 +27,14 @@ android {
jvmTarget = JavaVersion.VERSION_11
}
}

dependencies {
// r8 dependency
implementation 'com.android.tools:r8:3.3.28'
implementation project(path: ':google-java-format')
implementation project(path: ':eclipse-jdt')
implementation 'io.github.itsaky:nb-javac-android:17.0.0.1'
implementation project(path: ':common')
implementation project(path: ':project-creator')
implementation project(':kotlinc')

compileOnly files('libs/sora-editor.jar')
// r8 dependency
implementation 'com.android.tools:r8:3.3.28'
implementation project(path: ':google-java-format')
implementation project(path: ':eclipse-jdt')
implementation 'io.github.itsaky:nb-javac-android:17.0.0.1'
implementation project(path: ':common')
implementation project(path: ':project-creator')
implementation project(':kotlinc')
compileOnly files('libs/sora-editor.jar')
}
2 changes: 1 addition & 1 deletion android-compiler/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest />
<manifest />
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class GoogleJavaFormatter(input: String) {
fun format(): String {
val options =
JavaFormatterOptions.builder()
.style(JavaFormatterOptions.Style.AOSP) // Use AOSP formatting style
.style(JavaFormatterOptions.Style.AOSP) // Use 4 spaces for tab
.formatJavadoc(true) // Format Javadoc
.build()
val formatter = Formatter(options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ package com.pranav.android.interfaces
import android.content.Context

interface Builder {

fun getContext() : Context
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ExecuteDexTask(preferences: SharedPreferences, claz: String) : Task {
}

override fun getTaskName(): String {
return "Execute java Task";
return "Execute Java Task";
}

/*
Expand Down
11 changes: 8 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@
android:label="@string/app_name"
android:resizeableActivity="true"
android:supportsRtl="true"
android:theme="@style/Theme.CosmicIde.NoActionBar">
android:theme="@style/Theme.CosmicIde.App">

<activity
android:name=".MainActivity"
android:exported="true"
android:configChanges="uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize" />

<activity
android:name=".ProjectActivity"
android:exported="true">
android:exported="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -31,7 +34,9 @@

<activity
android:name=".SettingActivity"
android:exported="true" />
android:exported="true"
android:configChanges="uiMode"
android:windowSoftInputMode="adjustResize" />

<activity
android:name=".DebugActivity"
Expand Down
Loading