Skip to content

Commit

Permalink
Portfolio 20176 support for electric eel (#80)
Browse files Browse the repository at this point in the history
* [PORTFOLIO-20176] Добавляет поддержку Android Studio Electric Eel
  • Loading branch information
PStrelchenko committed Feb 10, 2023
1 parent f86e3be commit ec7ba64
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -3,8 +3,8 @@ on: [pull_request, workflow_call]

env:
# Link for Linux zip file from https://developer.android.com/studio/archive
ANDROID_STUDIO_URL: https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2021.3.1.15/android-studio-2021.3.1.15-linux.tar.gz
COMPILER_VERSION: 213.7172.25
ANDROID_STUDIO_URL: https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2022.1.1.20/android-studio-2022.1.1.20-linux.tar.gz
COMPILER_VERSION: 221.6008.13

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_build.yml
Expand Up @@ -7,8 +7,8 @@ on:

env:
# Link for Linux zip file from https://developer.android.com/studio/archive
ANDROID_STUDIO_URL: https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2021.3.1.15/android-studio-2021.3.1.15-linux.tar.gz
COMPILER_VERSION: 213.7172.25
ANDROID_STUDIO_URL: https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2022.1.1.20/android-studio-2022.1.1.20-linux.tar.gz
COMPILER_VERSION: 221.6008.13

jobs:
build:
Expand Down
16 changes: 11 additions & 5 deletions gradle.properties
Expand Up @@ -4,13 +4,19 @@ org.gradle.caching=false
kotlin.parallel.tasks.in.project=true
kotlin.code.style=official

systemProp.gradleIntellijPluginVersion=1.9.0
systemProp.gradleIntellijPluginVersion=1.12.0
systemProp.gradleChangelogPluginVersion=1.3.1
systemProp.kotlinVersion=1.7.10
systemProp.kotlinVersion=1.8.0
systemProp.detektVersion=1.21.0

systemProp.androidStudioPath=/Applications/Android Studio.app
systemProp.androidStudioCompilerVersion=213.7172.25
systemProp.androidStudioPath=/Applications/Android Studio.app/Contents
systemProp.androidStudioCompilerVersion=221.6008.13
systemProp.androidStudioPluginsNames=android,Kotlin,java,Groovy,git4idea,IntelliLang

org.gradle.kotlin.dsl.caching.buildcache=false
# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
# suppress inspection "UnusedProperty"
kotlin.stdlib.default.dependency=false

# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
# suppress inspection "UnusedProperty"
org.gradle.unsafe.configuration-cache=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 4 additions & 0 deletions plugins/hh-carnival/CHANGELOG.md
@@ -1,5 +1,9 @@
# Carnival

## [1.3.0]
### Added
- Support for Android Studio Electric Eel | 2022.1.1

## [1.2.0]
### Added
- Support compilation for Android Studio Dolphin | 2021.3.1
Expand Down
2 changes: 1 addition & 1 deletion plugins/hh-carnival/gradle.properties
@@ -1,4 +1,4 @@
pluginVersion=1.2.0
pluginVersion=1.3.0

pluginGroup=ru.hh.plugins
pluginName=hh-carnival
Expand Down
@@ -1,9 +1,8 @@
package ru.hh.android.plugin.core.model.enums

import com.android.SdkConstants

private const val ANDROID_WIDGET_PKG = "android.widget"
private const val ANDROIDX_APPCOMPAT_WIDGET_PKG = "${SdkConstants.ANDROIDX_APPCOMPAT_PKG}.widget"
private const val ANDROIDX_APPCOMPAT_WIDGET_PKG = "androidx.appcompat.widget"

/**
* Enum for holding hh.ru code style for XML views identifiers.
Expand All @@ -18,28 +17,28 @@ enum class CodeStyleViewDeclaration(
COLLAPSING_TOOLBAR_LAYOUT(
idPrefix = "collapsing_toolbar",
androidWidgetsClasses = listOf(
SdkConstants.COLLAPSING_TOOLBAR_LAYOUT.newName()
"com.google.android.material.appbar.CollapsingToolbarLayout"
)
),

APP_BAR_LAYOUT(
idPrefix = "app_bar",
androidWidgetsClasses = listOf(
SdkConstants.APP_BAR_LAYOUT.newName()
"com.google.android.material.appbar.AppBarLayout"
)
),

TOOLBAR(
idPrefix = "toolbar",
androidWidgetsClasses = listOf(
SdkConstants.TOOLBAR_V7.newName()
"androidx.appcompat.widget.Toolbar"
)
),

RECYCLER_VIEW(
idPrefix = "recycler",
androidWidgetsClasses = listOf(
SdkConstants.RECYCLER_VIEW.newName()
"androidx.recyclerview.widget.RecyclerView"
)
),

Expand Down Expand Up @@ -69,46 +68,46 @@ enum class CodeStyleViewDeclaration(
PROGRESS_BAR(
idPrefix = "progress",
androidWidgetsClasses = listOf(
"$ANDROID_WIDGET_PKG.${SdkConstants.PROGRESS_BAR}"
"$ANDROID_WIDGET_PKG.ProgressBar"
)
),

IMAGE_VIEW(
idPrefix = "image",
androidWidgetsClasses = listOf(
SdkConstants.FQCN_IMAGE_VIEW,
"android.widget.ImageView",
"$ANDROIDX_APPCOMPAT_WIDGET_PKG.AppCompatImageView"
)
),

CHECKBOX(
idPrefix = "checkbox",
androidWidgetsClasses = listOf(
SdkConstants.FQCN_CHECK_BOX,
"android.widget.CheckBox",
"$ANDROIDX_APPCOMPAT_WIDGET_PKG.AppCompatCheckBox"
)
),

BUTTON(
idPrefix = "button",
androidWidgetsClasses = listOf(
SdkConstants.FQCN_BUTTON,
"android.widget.Button",
"$ANDROIDX_APPCOMPAT_WIDGET_PKG.AppCompatButton"
)
),

EDIT_TEXT(
idPrefix = "edit_text",
androidWidgetsClasses = listOf(
SdkConstants.FQCN_EDIT_TEXT,
"android.widget.EditText",
"$ANDROIDX_APPCOMPAT_WIDGET_PKG.AppCompatEditText"
)
),

TEXT_VIEW(
idPrefix = "text_view",
androidWidgetsClasses = listOf(
SdkConstants.FQCN_TEXT_VIEW,
"android.widget.TextView",
"$ANDROIDX_APPCOMPAT_WIDGET_PKG.AppCompatTextView"
)
),
Expand All @@ -123,7 +122,7 @@ enum class CodeStyleViewDeclaration(
VIEW(
idPrefix = "view",
androidWidgetsClasses = listOf(
SdkConstants.CLASS_VIEW
"android.view.View"
)
)
}
4 changes: 4 additions & 0 deletions plugins/hh-garcon/CHANGELOG.md
@@ -1,5 +1,9 @@
# Garcon

## [1.2.0]
### Added
- Support for Android Studio Electric Eel | 2022.1.1

## [1.1.0]
### Added
- Support compilation for Android Studio Dolphin | 2021.3.1
Expand Down
2 changes: 1 addition & 1 deletion plugins/hh-garcon/gradle.properties
@@ -1,4 +1,4 @@
pluginVersion=1.1.0
pluginVersion=1.2.0

pluginGroup=ru.hh.plugins
pluginName=hh-garcon
Expand Down
@@ -1,7 +1,6 @@
package ru.hh.plugins.garcon.services

import android.databinding.tool.ext.toCamelCase
import com.android.SdkConstants
import com.intellij.openapi.components.Service
import com.intellij.openapi.components.service
import com.intellij.openapi.project.Project
Expand Down Expand Up @@ -86,7 +85,7 @@ class PageObjectPropertyConverter(

return when {
secondCheckDeclaration != null -> secondCheckDeclaration.value
else -> requireNotNull(configMap[SdkConstants.CLASS_VIEW])
else -> requireNotNull(configMap["android.view.View"])
}.also { classesMap[tagPsiClass] = it }
}

Expand All @@ -104,10 +103,10 @@ class PageObjectPropertyConverter(
result
}

return "${purifiedViewId}_${idSuffixes.first()}".toCamelCase().decapitalize()
return "${purifiedViewId}_${idSuffixes.first()}".toCamelCase().replaceFirstChar { it.uppercaseChar() }
}

private fun AndroidViewTagInfo.isRecyclerViewWidget(): Boolean {
return tagPsiClass.qualifiedName == SdkConstants.RECYCLER_VIEW.newName()
return tagPsiClass.qualifiedName == "androidx.recyclerview.widget.RecyclerView"
}
}
4 changes: 4 additions & 0 deletions plugins/hh-geminio/CHANGELOG.md
@@ -1,5 +1,9 @@
# Geminio

## [1.4.0]
### Added
- Support for Android Studio Electric Eel | 2022.1.1

## [1.3.0]
### Added
- Support for Android Studio Dolphin | 2021.3.1 (thanks to @IlyaGulya)
Expand Down
2 changes: 1 addition & 1 deletion plugins/hh-geminio/gradle.properties
@@ -1,4 +1,4 @@
pluginVersion=1.3.0
pluginVersion=1.4.0

pluginGroup=ru.hh.plugins
pluginName=hh-geminio
Expand Down

0 comments on commit ec7ba64

Please sign in to comment.