Skip to content

Commit 71e3d72

Browse files
Merge pull request #93 from Grigory-Rylov/actions
add simple actions
2 parents a7985f3 + ad47d9e commit 71e3d72

7 files changed

Lines changed: 77 additions & 6 deletions

File tree

.github/workflows/checks.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Java CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: '17'
18+
distribution: 'temurin'
19+
20+
- name: Validate Gradle wrapper
21+
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
22+
23+
- name: Build with Gradle
24+
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
25+
26+
with:
27+
arguments: build

.github/workflows/pr_master.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Java CI
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Set up JDK 17
13+
uses: actions/setup-java@v3
14+
with:
15+
java-version: '17'
16+
distribution: 'temurin'
17+
18+
- name: Validate Gradle wrapper
19+
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
20+
21+
- name: Build with Gradle
22+
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
23+
24+
with:
25+
arguments: fatJar
26+
27+
- name : Retrieve Version
28+
run: |
29+
echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew -q printVersionName)"
30+
id: yamp_version
31+
32+
- name: Get version
33+
run:
34+
echo "version_name=${{steps.yamp_version.outputs.VERSION_NAME}}" >> $GITHUB_ENV
35+
36+
- run: echo ${{env.version_name}}
37+
38+
- uses: actions/upload-artifact@v3
39+
with:
40+
name: yamp-${{env.version_name}}
41+
path: app/build/libs

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def properties(String key) {
1010
}
1111

1212
group = properties("pluginGroup")
13-
version = properties("pluginVersion")
13+
version = properties("yampVersion")
1414

1515
sourceCompatibility = 11
1616

@@ -58,7 +58,7 @@ task fatJar(type: Jar) {
5858
manifest {
5959
attributes 'Main-Class': 'com.github.grishberg.profiler.Launcher',
6060
'Implementation-Title': 'Android Methods Profiler',
61-
'Implementation-Version': version
61+
'Implementation-Version': archiveVersion
6262
}
6363

6464
duplicatesStrategy = DuplicatesStrategy.EXCLUDE

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ allprojects {
3838
}
3939
}
4040
}
41+
42+
task printVersionName {
43+
println project.findProperty("yampVersion").toString()
44+
}

core/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ repositories {
99
google()
1010
mavenCentral()
1111
maven { url 'https://jitpack.io' }
12-
jcenter()
1312
}
1413

1514
dependencies {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ studioCompilePath=/Applications/Android Studio.app/Contents
88

99
pluginGroup = com.github.grishberg
1010
pluginName = android-methods-profiler
11-
pluginVersion = 23.01.17.0
11+
yampVersion = 23.01.17
1212

1313
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1414
# for insight into build numbers and IntelliJ Platform versions.

plugin/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ plugins {
1616
fun properties(key: String) = project.findProperty(key).toString()
1717

1818
group = properties("pluginGroup")
19-
version = properties("pluginVersion")
19+
version = properties("yampVersion")
2020

2121
// Configure project's dependencies
2222
repositories {
@@ -59,7 +59,7 @@ dependencies {
5959
tasks {
6060

6161
patchPluginXml {
62-
version.set(properties("pluginVersion"))
62+
version.set(properties("yampVersion"))
6363
sinceBuild.set(properties("pluginSinceBuild"))
6464
untilBuild.set(properties("pluginUntilBuild"))
6565

0 commit comments

Comments
 (0)