Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
8141346
fix: attribute name not shown in delete attribute dialog
itsaky Jan 7, 2023
b72f95d
chore: use collapsed versions in Nyx config
itsaky Jan 7, 2023
0df55c0
refactor(lsp/java): remove unused imports and methods
itsaky Jan 7, 2023
4b53fd6
chore: fix jvmTarget warnings in subprojects
itsaky Jan 7, 2023
f4b0a4f
fix: remove usage of partial reparser to reduce LSP errors
itsaky Jan 8, 2023
3a6387a
fix: NPE in FindHelper while finding definition of a symbol
itsaky Jan 8, 2023
f0dfda3
fix: ensure openedFiles.json always exists
itsaky Jan 8, 2023
334dc39
chore: update crowdin contributors table
itsaky Jan 7, 2023
0806101
tests: ignore PartialReparserTest
itsaky Jan 8, 2023
88740f8
fix(deps): update dependency com.google.code.gson:gson to v2.10.1
renovate[bot] Jan 9, 2023
571da27
chore: update bug report template
itsaky Jan 10, 2023
3542ad1
chore: update feature request template
itsaky Jan 10, 2023
fae39e0
tests: fix assertion error in CompilationTaskProcessor implementation
itsaky Jan 10, 2023
0e4a776
refactor(lsp/java): refactor code in JavaParserUtils
itsaky Jan 11, 2023
b253115
fix(lsp/java): fully qualified names are used in generated setters
itsaky Jan 11, 2023
1682cbc
fix(lsp/java): type params not included in generated constructor para…
itsaky Jan 11, 2023
1e708a2
Update FUNDING.yml
itsaky Jan 12, 2023
b9bef99
fix(deps): update editor to v0.21.0
itsaky Jan 14, 2023
2edb2d1
fix: dynamic colors are not applied to main activity
itsaky Jan 14, 2023
ff20e65
fix: try to fix #734
itsaky Jan 14, 2023
2e43882
chore(deps): update agp to v7.4.0
renovate[bot] Jan 13, 2023
08c1444
fix(xml-inflater,uidesigner): attributes without namespaces are not h…
itsaky Jan 14, 2023
5de4a58
fix(xml-inflater): log messages instead of throwing exceptions while …
itsaky Jan 14, 2023
83b8ffb
refactor: remove unused subprojects
itsaky Jan 15, 2023
193d82a
fix: remove unused 'scheme.langs' property from color schemes
itsaky Jan 17, 2023
ef97b37
fix: undefined file types are not handled by TreeSitterLanguage
itsaky Jan 17, 2023
7dacc98
chore(deps): update plugin com.mooltiverse.oss.nyx to v1.3.1
renovate[bot] Jan 17, 2023
0a0c9f1
fix(deps): update dependency androidx.appcompat:appcompat to v1.6.0
renovate[bot] Jan 17, 2023
c6e1f35
fix(deps): update dependency org.jetbrains:annotations to v24
renovate[bot] Jan 18, 2023
cbec897
fix: detect leaked closable objects
itsaky Jan 18, 2023
97d8f66
feat: replace Toaster with Flashbar
itsaky Jan 18, 2023
618c408
fix: address some memory leaks
itsaky Jan 18, 2023
bc156a9
fix(editor,lsp/java): avoid reflective access to IDEEditor
itsaky Jan 19, 2023
be3bcdc
refactor: move hardcoded dependencies to version catalog
itsaky Jan 19, 2023
5542c69
fix(deps/tooling-api): update builder-model to v7.4.0
itsaky Jan 19, 2023
9cdc4bd
tests: test tooling api implementation with minimum supported version…
itsaky Jan 19, 2023
1e944ba
tests: test AGP 7.4.0 with tooling API implementation
itsaky Jan 19, 2023
8a1661c
chore: disable collapsed versions for mainline release
itsaky Jan 19, 2023
15bebba
chore: do not run publish job for pull requests
itsaky Jan 19, 2023
73b2946
fix(flashbar): always show on UI thread
itsaky Jan 20, 2023
715ef2e
feat(actions): add API to destroy ActionItem instances
itsaky Jan 20, 2023
377e1d3
fix: release dialog instance when RunTasksAction is destroyed
itsaky Jan 20, 2023
205a39b
fix: memory leak caused due to retained ViewInfoSheet instance in Des…
itsaky Jan 20, 2023
4c1f78c
fix: fix memory leaks related to GradleBuildService and editor activity
itsaky Jan 20, 2023
219625a
chore(deps): update plugin com.mooltiverse.oss.nyx to v1.3.2
renovate[bot] Jan 21, 2023
17ac655
refactor: refactor
itsaky Jan 22, 2023
e659287
refactor: remove 'Gradle daemon status' action
itsaky Jan 23, 2023
aa47ea9
fix: memory leak in APK installation callback
itsaky Jan 23, 2023
a7bb517
docs: add docs for UI Designer
itsaky Dec 28, 2022
a9d7457
docs: update docs
itsaky Jan 17, 2023
ed5079f
docs(editor): update docs for color scheme
itsaky Jan 17, 2023
712fc70
docs(editor): update docs for color scheme
itsaky Jan 18, 2023
ac1d0d0
docs: add docs for dark variant of a color scheme
itsaky Jan 24, 2023
f02dce0
chore(deps): update plugin com.mooltiverse.oss.nyx to v1.3.3
renovate[bot] Jan 24, 2023
7fd2b79
fix(tooling-api): register custom GSON adapter for java.io.File
itsaky Jan 25, 2023
f8e370a
fix: update tests to be compatible with JDK 17
itsaky Jan 28, 2023
755043b
refactor(javac): update nb-javac-android
itsaky Jan 28, 2023
c4f6727
fix(xml-inflater): attributes on <include> tag are not applied to Inc…
itsaky Jan 28, 2023
e06aa1c
fix(xml-inflater): some required methods are not overridden by Includ…
itsaky Jan 28, 2023
1cc1f21
fix(tooling-api): FileTypeAdapter is incorrectly implemented
itsaky Jan 28, 2023
96ca54c
refactor: removed unnecessary JavacTaskUtil class
itsaky Jan 28, 2023
dadaf0d
fix: crash if the built application cannot be launched (closes #759)
itsaky Jan 28, 2023
d47796f
chore: run workflow build with JDK 17
itsaky Jan 29, 2023
590f6cc
Add API 33 in Project Creator
deepkrg17 Feb 2, 2023
0f6abf3
refactor: rename package 'javax' to 'jdkx'
itsaky Feb 11, 2023
40d128d
refactor: resolve some compiler warnings
itsaky Feb 11, 2023
25a76e9
fix(xml-inflater,uidesigner): exclude unsupported view adapters from …
itsaky Feb 11, 2023
288c551
docs: update javadoc for IViewAdapter
itsaky Feb 11, 2023
2692bbb
fix(xml-inflater): invalid IView instance is added to parent view in …
itsaky Feb 11, 2023
4535295
fix(xml-inflater): invalid IView instance is added to parent view in …
itsaky Feb 11, 2023
8b3e140
fix(tests): update LayoutInflaterTest
itsaky Feb 11, 2023
6658ecb
fix: fix memory leak when application is closed while initializing pr…
itsaky Feb 11, 2023
00c5633
refactor: fix typo in method name
itsaky Feb 11, 2023
2a84174
fix: invalid path specified in :subprojects:tooling-api-model:copyToT…
itsaky Feb 11, 2023
2b61d92
fix: UTF-8 character in CharOperation causes build issues on Windows …
itsaky Feb 11, 2023
29a71eb
chore(deps): update plugin com.mooltiverse.oss.nyx to v2 (#767)
renovate[bot] Feb 12, 2023
5825b29
fix(deps): update kotlin monorepo to v1.8.10 (#776)
renovate[bot] Feb 12, 2023
240c48a
chore(deps): update agp to v7.4.1 (#773)
renovate[bot] Feb 12, 2023
e70b126
fix(deps): update dependency com.google.devtools.ksp:symbol-processin…
renovate[bot] Feb 12, 2023
4357cee
fix(deps): update dependency androidx.appcompat:appcompat to v1.6.1 (…
renovate[bot] Feb 12, 2023
2319847
fix(deps): update dependency com.google.android.material:material to …
renovate[bot] Feb 12, 2023
e6e02b0
fix(resources): some unstranslatable strings are translatable
itsaky Feb 12, 2023
fbf93b5
fix(resources): some unstranslatable strings are translatable
itsaky Feb 12, 2023
eaaeb3e
fix(deps): update tree-sitter to v1.2.1 (#791)
renovate[bot] Feb 12, 2023
5b51a0f
fix(deps): update dependency com.github.javaparser:javaparser-symbol-…
renovate[bot] Feb 12, 2023
42d42b2
fix(deps): update dependency com.android.tools.build:builder-model to…
renovate[bot] Feb 12, 2023
94598eb
fix(resources): some unstranslatable strings are translatable
itsaky Feb 12, 2023
bf40573
chore: update crowdin contributors table (#760)
github-actions[bot] Feb 12, 2023
b129cb2
New Crowdin updates (#728)
itsaky Feb 12, 2023
cd8758a
New Crowdin updates (#793)
itsaky Feb 13, 2023
0ebc895
chore: update crowdin contributors table (#792)
github-actions[bot] Feb 13, 2023
44bb9ee
chore: add proguard rules to ignore 'jdkx.**' classes
itsaky Feb 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
github: AndroidIDEOfficial
open_collective: androidide
custom: ['https://androidide.com/donate.php']
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/BUG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ body:
label: What version of AndroidIDE you're using?
multiple: false
options:
- v2.1.4 (debug builds)
- v2.2.0 (debug builds)
- v2.2.0
- v2.1.4
- v2.1.3
- v2.1.2
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/FEATURE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ body:
label: What version of AndroidIDE you're using?
multiple: false
options:
- v2.1.4 (debug builds)
- v2.2.0 (debug builds)
- v2.2.0
- v2.1.4
- v2.1.3
- v2.1.2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
- name: Change Gradle wrapper permissions
run: chmod +x ./gradlew
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
name: Publish release
runs-on: ubuntu-latest
needs: [build_apk, unit_test_debug, test_tooling_api]
if: ${{ always() && github.ref == 'refs/heads/main' && needs.build_apk.result == 'success' && needs.unit_test_debug.result == 'success' && needs.test_tooling_api.result == 'success' }}
if: ${{ always() && github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && needs.build_apk.result == 'success' && needs.unit_test_debug.result == 'success' && needs.test_tooling_api.result == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -206,4 +206,4 @@ jobs:
if: ${{ always() }}
with:
name: .nyx-state-${{ github.job }}.json
path: build/nyx-state.json
path: build/nyx-state.json
5 changes: 0 additions & 5 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/compiler.xml
100755 → 100644

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml
100755 → 100644

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .nyx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ releaseTypes:
items:
mainline:
description: "{{#file.content}}build/CHANGELOG.md{{/file.content}}"
collapseVersions: false
gitPush: true
gitTag: true
publish: true
Expand Down
18 changes: 9 additions & 9 deletions CROWDIN_CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ Thanks to all these people, AndroidIDE has been translated into multiple languag
<br />
<sub><b>Akash Yadav (itsaky)</b></sub></a>
<br />
<sub><b>14055 words</b></sub>
<sub><b>49378 words</b></sub>
</td>
<td align="center" valign="top">
<a href="https://crowdin.com/profile/smith8h"><img alt="logo" style="width: 64px" src="https://crowdin-static.downloads.crowdin.com/avatar/15550455/medium/9c5a3d089c209487340abb35d74b5b7c.jpg" />
<a href="https://crowdin.com/profile/esalessandrx"><img alt="logo" style="width: 64px" src="https://crowdin-static.downloads.crowdin.com/avatar/15563911/medium/a2262fe354d51d9c991d06fcace20b7a.jpg" />
<br />
<sub><b>Hussein Smith (smith8h)</b></sub></a>
<sub><b>Alessandro (esalessandrx)</b></sub></a>
<br />
<sub><b>2110 words</b></sub>
<sub><b>2295 words</b></sub>
</td>
<td align="center" valign="top">
<a href="https://crowdin.com/profile/esalessandrx"><img alt="logo" style="width: 64px" src="https://crowdin-static.downloads.crowdin.com/avatar/15563911/medium/a2262fe354d51d9c991d06fcace20b7a.jpg" />
<a href="https://crowdin.com/profile/smith8h"><img alt="logo" style="width: 64px" src="https://crowdin-static.downloads.crowdin.com/avatar/15550455/medium/9c5a3d089c209487340abb35d74b5b7c.jpg" />
<br />
<sub><b>Alessandro (esalessandrx)</b></sub></a>
<sub><b>Hussein Smith (smith8h)</b></sub></a>
<br />
<sub><b>2032 words</b></sub>
<sub><b>2224 words</b></sub>
</td>
<td align="center" valign="top">
<a href="https://crowdin.com/profile/adnroid"><img alt="logo" style="width: 64px" src="https://crowdin-static.downloads.crowdin.com/avatar/15503338/medium/c21cc0623c3ff71d53cb1f1a6e5d7757.png" />
Expand All @@ -38,7 +38,7 @@ Thanks to all these people, AndroidIDE has been translated into multiple languag
<br />
<sub><b>Andi Hasan A (andihasan97)</b></sub></a>
<br />
<sub><b>977 words</b></sub>
<sub><b>1094 words</b></sub>
</td>
<td align="center" valign="top">
<a href="https://crowdin.com/profile/friostd"><img alt="logo" style="width: 64px" src="https://crowdin-static.downloads.crowdin.com/avatar/15549279/medium/2d1718f34c949d5df55e346a0d6e5cb0.jpeg" />
Expand All @@ -59,7 +59,7 @@ Thanks to all these people, AndroidIDE has been translated into multiple languag
<br />
<sub><b>Deep Kr. Ghosh (deepkrg17)</b></sub></a>
<br />
<sub><b>149 words</b></sub>
<sub><b>221 words</b></sub>
</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import android.view.View
/**
* An action that can be registered using the [ActionsRegistry]
* [com.itsaky.androidide.actions.ActionsRegistry]
*
* @author Akash Yadav
*/
interface ActionItem {
Expand All @@ -37,6 +38,7 @@ interface ActionItem {

/**
* Prepare the action. Subclasses can modify the visual properties of this action here.
*
* @param data The data containing various information about the event.
*/
fun prepare(data: ActionData)
Expand All @@ -57,6 +59,12 @@ interface ActionItem {
*/
fun postExec(data: ActionData, result: Any) = Unit

/**
* Called when the action item is to be destroyed. Any resource references must be released if
* held.
*/
fun destroy() = Unit

/**
* Return the show as action flags for the menu item.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class DefaultActionsRegistry : ActionsRegistry() {
val actions = getActions(action.location)
val older = actions.remove(action.id)
if (older != null) {
older.destroy()
return true
}

Expand All @@ -76,6 +77,7 @@ class DefaultActionsRegistry : ActionsRegistry() {
for (locations in this.actions.values) {
val older = locations.remove(id)
if (older != null) {
older.destroy()
return true
}
}
Expand All @@ -86,7 +88,13 @@ class DefaultActionsRegistry : ActionsRegistry() {
override fun findAction(location: ActionItem.Location, id: String): ActionItem? =
getActions(location)[id]

override fun clearActions(location: ActionItem.Location) = getActions(location).clear()
override fun clearActions(location: ActionItem.Location) {
val actions = getActions(location)
actions.forEach {
it.value.destroy()
}
actions.clear()
}

override fun registerActionExecListener(listener: ActionExecListener) {
listeners.add(listener)
Expand Down
1 change: 1 addition & 0 deletions annotation-ksp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies {

implementation(projects.annotations)

implementation(libs.androidx.annotation)
implementation(libs.common.javapoet)
implementation(libs.common.ksp)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package com.itsaky.androidide.annotations.ksp.inflater

import androidx.annotation.RequiresApi
import com.google.devtools.ksp.KspExperimental
import com.google.devtools.ksp.getAnnotationsByType
import com.google.devtools.ksp.isAnnotationPresent
Expand Down Expand Up @@ -187,6 +188,11 @@ class ViewAdapterIndexGenerator(private val logger: KSPLogger) {
result
}
} else null

val requiresApi =
if (sym.isAnnotationPresent(RequiresApi::class))
sym.getAnnotationsByType(RequiresApi::class).iterator().next()
else null

val viewName = getViewName(viewAdapter)
val moduleNs = getModuleNs(viewAdapter)
Expand All @@ -195,6 +201,12 @@ class ViewAdapterIndexGenerator(private val logger: KSPLogger) {
val viewTypeName =
ClassName.get(viewName.substringBeforeLast('.'), viewName.substringAfterLast('.'))

requiresApi?.let { annotation ->
val api = if (annotation.value == 1) annotation.api else annotation.value
val androidBuild = ClassName.get("android.os", "Build")
block.beginControlFlow("if(\$T.VERSION.SDK_INT >= \$L)", androidBuild, api)
}

block.addStatement(
"final var adapter = new \$T()",
ParameterizedTypeName.get(adapterTypeName, viewTypeName)
Expand All @@ -213,6 +225,8 @@ class ViewAdapterIndexGenerator(private val logger: KSPLogger) {
)
}

requiresApi?.let { block.endControlFlow() }

indexAddStatements.add("{\n")
indexAddStatements.indent()
indexAddStatements.add(block.build())
Expand All @@ -238,7 +252,7 @@ class ViewAdapterIndexGenerator(private val logger: KSPLogger) {
)

indexClassBuilder.addStaticBlock(indexAddStatements.build())

OutputStreamWriter(out).use {
val file = JavaFile.builder(INDEX_PACKAGE_NAME, indexClassBuilder.build())
file.build().writeTo(it)
Expand All @@ -256,11 +270,11 @@ class ViewAdapterIndexGenerator(private val logger: KSPLogger) {
}

private fun getViewType(viewAdapter: KSAnnotation) =
(getViewAdapterArg(viewAdapter, "forView") as KSType)
(getAnnotationArg(viewAdapter, "forView") as KSType)

private fun getModuleNs(viewAdapter: KSAnnotation) =
(getViewAdapterArg(viewAdapter, "moduleNamespace") as String)
(getAnnotationArg(viewAdapter, "moduleNamespace") as String)

private fun getViewAdapterArg(viewAdapter: KSAnnotation, arg: String) =
private fun getAnnotationArg(viewAdapter: KSAnnotation, arg: String) =
viewAdapter.arguments.first { it.name!!.asString() == arg }.value
}
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ android {
kapt { arguments { arg("eventBusIndex", "com.itsaky.androidide.events.AppEventsIndex") } }

dependencies {

debugImplementation(libs.common.leakcanary)

// Annotation processors
kapt(libs.common.glide.ap)
Expand Down
7 changes: 4 additions & 3 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
-dontobfuscate

-keep class javax.** { *; }
-keep class jdkx.** { *; }

# keep javac classes
-keep class com.sun.** { *; }
-keep class openjdk.** { *; }

# Android builder model interfaces
-keep class com.android.** { *; }
Expand Down Expand Up @@ -55,7 +56,7 @@
-keep class * extends com.itsaky.androidide.lsp.java.providers.completion.IJavaCompletionProvider {
<init>(...);
}
-keep class com.itsaky.androidide.editor.IEditor { *; }
-keep class com.itsaky.androidide.editor.api.IEditor { *; }
-keep class * extends com.itsaky.androidide.inflater.IViewAdapter { *; }
-keep class * extends com.itsaky.androidide.inflater.drawable.IDrawableParser {
<init>(...);
Expand Down Expand Up @@ -83,4 +84,4 @@
-keepclasseswithmembers class ** {
native <methods>;
}
-keep class com.itsaky.androidide.treesitter.** { *; }
-keep class com.itsaky.androidide.treesitter.** { *; }
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
android:windowSoftInputMode="adjustResize" />

<service
android:name=".services.GradleBuildService"
android:name=".services.builder.GradleBuildService"
android:exported="false" />

<provider
Expand Down
Binary file modified app/src/main/assets/data/common/tooling-api-all.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,14 @@ class RunTasksAction() : BaseBuildAction() {
val activity = getActivity(data)!!
result.show(activity.supportFragmentManager, this.id)
}

override fun destroy() {
super.destroy()
try {
dialog?.dismiss()
} catch (e: Exception) {
// ignored
}
dialog = null
}
}

This file was deleted.

Loading