Skip to content

Commit ec7ba64

Browse files
authored
Portfolio 20176 support for electric eel (#80)
* [PORTFOLIO-20176] Добавляет поддержку Android Studio Electric Eel
1 parent f86e3be commit ec7ba64

File tree

12 files changed

+46
-30
lines changed

12 files changed

+46
-30
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ on: [pull_request, workflow_call]
33

44
env:
55
# Link for Linux zip file from https://developer.android.com/studio/archive
6-
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
7-
COMPILER_VERSION: 213.7172.25
6+
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
7+
COMPILER_VERSION: 221.6008.13
88

99
jobs:
1010
build:

.github/workflows/release_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77

88
env:
99
# Link for Linux zip file from https://developer.android.com/studio/archive
10-
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
11-
COMPILER_VERSION: 213.7172.25
10+
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
11+
COMPILER_VERSION: 221.6008.13
1212

1313
jobs:
1414
build:

gradle.properties

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ org.gradle.caching=false
44
kotlin.parallel.tasks.in.project=true
55
kotlin.code.style=official
66

7-
systemProp.gradleIntellijPluginVersion=1.9.0
7+
systemProp.gradleIntellijPluginVersion=1.12.0
88
systemProp.gradleChangelogPluginVersion=1.3.1
9-
systemProp.kotlinVersion=1.7.10
9+
systemProp.kotlinVersion=1.8.0
1010
systemProp.detektVersion=1.21.0
1111

12-
systemProp.androidStudioPath=/Applications/Android Studio.app
13-
systemProp.androidStudioCompilerVersion=213.7172.25
12+
systemProp.androidStudioPath=/Applications/Android Studio.app/Contents
13+
systemProp.androidStudioCompilerVersion=221.6008.13
1414
systemProp.androidStudioPluginsNames=android,Kotlin,java,Groovy,git4idea,IntelliLang
1515

16-
org.gradle.kotlin.dsl.caching.buildcache=false
16+
# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
17+
# suppress inspection "UnusedProperty"
18+
kotlin.stdlib.default.dependency=false
19+
20+
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
21+
# suppress inspection "UnusedProperty"
22+
org.gradle.unsafe.configuration-cache=true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

plugins/hh-carnival/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Carnival
22

3+
## [1.3.0]
4+
### Added
5+
- Support for Android Studio Electric Eel | 2022.1.1
6+
37
## [1.2.0]
48
### Added
59
- Support compilation for Android Studio Dolphin | 2021.3.1

plugins/hh-carnival/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pluginVersion=1.2.0
1+
pluginVersion=1.3.0
22

33
pluginGroup=ru.hh.plugins
44
pluginName=hh-carnival

plugins/hh-carnival/src/main/kotlin/ru/hh/android/plugin/core/model/enums/CodeStyleViewDeclaration.kt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package ru.hh.android.plugin.core.model.enums
22

3-
import com.android.SdkConstants
43

54
private const val ANDROID_WIDGET_PKG = "android.widget"
6-
private const val ANDROIDX_APPCOMPAT_WIDGET_PKG = "${SdkConstants.ANDROIDX_APPCOMPAT_PKG}.widget"
5+
private const val ANDROIDX_APPCOMPAT_WIDGET_PKG = "androidx.appcompat.widget"
76

87
/**
98
* Enum for holding hh.ru code style for XML views identifiers.
@@ -18,28 +17,28 @@ enum class CodeStyleViewDeclaration(
1817
COLLAPSING_TOOLBAR_LAYOUT(
1918
idPrefix = "collapsing_toolbar",
2019
androidWidgetsClasses = listOf(
21-
SdkConstants.COLLAPSING_TOOLBAR_LAYOUT.newName()
20+
"com.google.android.material.appbar.CollapsingToolbarLayout"
2221
)
2322
),
2423

2524
APP_BAR_LAYOUT(
2625
idPrefix = "app_bar",
2726
androidWidgetsClasses = listOf(
28-
SdkConstants.APP_BAR_LAYOUT.newName()
27+
"com.google.android.material.appbar.AppBarLayout"
2928
)
3029
),
3130

3231
TOOLBAR(
3332
idPrefix = "toolbar",
3433
androidWidgetsClasses = listOf(
35-
SdkConstants.TOOLBAR_V7.newName()
34+
"androidx.appcompat.widget.Toolbar"
3635
)
3736
),
3837

3938
RECYCLER_VIEW(
4039
idPrefix = "recycler",
4140
androidWidgetsClasses = listOf(
42-
SdkConstants.RECYCLER_VIEW.newName()
41+
"androidx.recyclerview.widget.RecyclerView"
4342
)
4443
),
4544

@@ -69,46 +68,46 @@ enum class CodeStyleViewDeclaration(
6968
PROGRESS_BAR(
7069
idPrefix = "progress",
7170
androidWidgetsClasses = listOf(
72-
"$ANDROID_WIDGET_PKG.${SdkConstants.PROGRESS_BAR}"
71+
"$ANDROID_WIDGET_PKG.ProgressBar"
7372
)
7473
),
7574

7675
IMAGE_VIEW(
7776
idPrefix = "image",
7877
androidWidgetsClasses = listOf(
79-
SdkConstants.FQCN_IMAGE_VIEW,
78+
"android.widget.ImageView",
8079
"$ANDROIDX_APPCOMPAT_WIDGET_PKG.AppCompatImageView"
8180
)
8281
),
8382

8483
CHECKBOX(
8584
idPrefix = "checkbox",
8685
androidWidgetsClasses = listOf(
87-
SdkConstants.FQCN_CHECK_BOX,
86+
"android.widget.CheckBox",
8887
"$ANDROIDX_APPCOMPAT_WIDGET_PKG.AppCompatCheckBox"
8988
)
9089
),
9190

9291
BUTTON(
9392
idPrefix = "button",
9493
androidWidgetsClasses = listOf(
95-
SdkConstants.FQCN_BUTTON,
94+
"android.widget.Button",
9695
"$ANDROIDX_APPCOMPAT_WIDGET_PKG.AppCompatButton"
9796
)
9897
),
9998

10099
EDIT_TEXT(
101100
idPrefix = "edit_text",
102101
androidWidgetsClasses = listOf(
103-
SdkConstants.FQCN_EDIT_TEXT,
102+
"android.widget.EditText",
104103
"$ANDROIDX_APPCOMPAT_WIDGET_PKG.AppCompatEditText"
105104
)
106105
),
107106

108107
TEXT_VIEW(
109108
idPrefix = "text_view",
110109
androidWidgetsClasses = listOf(
111-
SdkConstants.FQCN_TEXT_VIEW,
110+
"android.widget.TextView",
112111
"$ANDROIDX_APPCOMPAT_WIDGET_PKG.AppCompatTextView"
113112
)
114113
),
@@ -123,7 +122,7 @@ enum class CodeStyleViewDeclaration(
123122
VIEW(
124123
idPrefix = "view",
125124
androidWidgetsClasses = listOf(
126-
SdkConstants.CLASS_VIEW
125+
"android.view.View"
127126
)
128127
)
129128
}

plugins/hh-garcon/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Garcon
22

3+
## [1.2.0]
4+
### Added
5+
- Support for Android Studio Electric Eel | 2022.1.1
6+
37
## [1.1.0]
48
### Added
59
- Support compilation for Android Studio Dolphin | 2021.3.1

plugins/hh-garcon/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pluginVersion=1.1.0
1+
pluginVersion=1.2.0
22

33
pluginGroup=ru.hh.plugins
44
pluginName=hh-garcon

plugins/hh-garcon/src/main/kotlin/ru/hh/plugins/garcon/services/PageObjectPropertyConverter.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package ru.hh.plugins.garcon.services
22

33
import android.databinding.tool.ext.toCamelCase
4-
import com.android.SdkConstants
54
import com.intellij.openapi.components.Service
65
import com.intellij.openapi.components.service
76
import com.intellij.openapi.project.Project
@@ -86,7 +85,7 @@ class PageObjectPropertyConverter(
8685

8786
return when {
8887
secondCheckDeclaration != null -> secondCheckDeclaration.value
89-
else -> requireNotNull(configMap[SdkConstants.CLASS_VIEW])
88+
else -> requireNotNull(configMap["android.view.View"])
9089
}.also { classesMap[tagPsiClass] = it }
9190
}
9291

@@ -104,10 +103,10 @@ class PageObjectPropertyConverter(
104103
result
105104
}
106105

107-
return "${purifiedViewId}_${idSuffixes.first()}".toCamelCase().decapitalize()
106+
return "${purifiedViewId}_${idSuffixes.first()}".toCamelCase().replaceFirstChar { it.uppercaseChar() }
108107
}
109108

110109
private fun AndroidViewTagInfo.isRecyclerViewWidget(): Boolean {
111-
return tagPsiClass.qualifiedName == SdkConstants.RECYCLER_VIEW.newName()
110+
return tagPsiClass.qualifiedName == "androidx.recyclerview.widget.RecyclerView"
112111
}
113112
}

0 commit comments

Comments
 (0)