Skip to content

Instantly share code, notes, and snippets.

View h0tk3y's full-sized avatar

Sergey Igushkin h0tk3y

View GitHub Profile
@h0tk3y
h0tk3y / 00-README.md
Last active July 4, 2024 16:00
DCL IDE experiment

Experimenting with DCL support in Android Studio

This set of patches shows some experiments in Android Studio to add features in the DCL support. It is based on the approach of directly converting DCL PSI elements to the DCL language tree and using that as an input to the Gradle analysis implementation. Therefore, it does not need to run the Gradle parser on the source text at all.

@h0tk3y
h0tk3y / 00-README.md
Last active July 2, 2024 10:44
AGP DCL support experimental changes

Experiment using AGP as a DCL model

Changes

Trimmed string navigation problem

You are given a multiline string $source$ – the content of a source file, and two numbers $startLine$ and $endLine$ such that $0 \le startLine \le endLine < nLines$ where $nLines$ is the number of lines in $source$.

Trimming

You need to produce the resulting string $result$ such that:

  • It does not have any content from the $source$ lines whose zero-based line numbers $i < startLine$ or $i > endLine$.
  • It contains the lines at indices $i$ such that $startLine \le i \le endLine$, transformed by trimming the shortest
[Your Name]
[Your Address]
[City, State, Zip]
[Your Email]
[Your Phone Number]
[Date]
Hiring Manager’s Name
Recordati
[Company Address]
@h0tk3y
h0tk3y / restricted-dsl-apis.md
Last active December 1, 2023 14:51
restricted-dsl-apis.md

Supported APIs in settings.gradle.something:

  • Settings:
    • val rootProject: ProjectDescriptor
    • include(projectPath: String) (the vararg overload is not supported)
    • pluginManagement(pluginManagementSpec: PluginManagementSpec.() -> Unit)
      • (+ val pluginManagement)
    • dependencyResolutionManagement(dependencyResolutionConfiguration: DependencyResolutionManagement.() -> Unit)
      • (+ val dependencyResolutionManagement)
    • enableFeaturePreview(name: String)

[Your Name]

Professor and Laboratory Head

Tolyatti State University

[Address]

Tolyatti, Russia

ა - ани [ɑ]
ბ - бани [b]
გ - гани [ɡ]
დ - дони [d]
ე - эни [ɛ]
ვ - вини [v]
ზ - зени [z]
თ - тхани [tʰ]
ი - ини [ɪ]
კ - кани [kʼ]
04-14 00:17:29.116 30458 30458 E AndroidRuntime: FATAL EXCEPTION: main
04-14 00:17:29.116 30458 30458 E AndroidRuntime: Process: com.vk.equals, PID: 30458
04-14 00:17:29.116 30458 30458 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vk.equals/com.vk.equals.MainActivity}: android.view.InflateException: Binary XML file line #38 in com.vkontakte.android:layout/bottom_navigation_container: parent=LinearLayout:com.vkontakte.android:id/bottom_navigation_sliding_container, view=com.vkontakte.android.ui.bottomnavigation.BottomNavigationView:com.vkontakte.android:id/bottom_navigation
04-14 00:17:29.116 30458 30458 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4169)
04-14 00:17:29.116 30458 30458 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4315)
04-14 00:17:29.116 30458 30458 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
04-14
@h0tk3y
h0tk3y / PropertiesExtension.java
Last active March 2, 2023 11:15
Gradle instrumentation tool codegen example for properties
class PropertiesExtension implements AnnotatedMethodReaderExtension, CodeGeneratorContributor {
@Override
public InstrumentationCodeGenerator contributeCodeGenerator() {
return new CodeGeneratorContributor() {
@Override
public InstrumentationCodeGenerator contributeCodeGenerator() {
// look for the extra data in the requests – find the ones that need accessor
@h0tk3y
h0tk3y / #call-interception-codegen-example-outputs.md
Last active February 16, 2023 12:23
Call interception generated sources example

The two files below are example outputs of the code generator for call interception in gradle/gradle