Skip to content

Commit 3140a60

Browse files
committed
useless build-step removed.
1 parent f153051 commit 3140a60

File tree

4 files changed

+25
-41
lines changed

4 files changed

+25
-41
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,12 @@ jobs:
2929
uses: actions/setup-java@v4
3030
with:
3131
distribution: corretto
32-
java-version: '17'
3332
architecture: x64
34-
35-
- name: 🔢 Configure build
36-
shell: bash
37-
env:
38-
JAVA_KEYSTORE_DEBUG: ${{ secrets.JAVA_KEYSTORE_DEBUG }}
39-
JAVA_KEYSTORE_UPLOAD: ${{ secrets.JAVA_KEYSTORE_UPLOAD }}
40-
JAVA_KEYSTORE_PROPERTIES: ${{ secrets.JAVA_KEYSTORE_PROPERTIES }}
41-
AGC_API_CONFIG: ${{ secrets.AGC_API_CONFIG }}
42-
AGC_APP_RELEASE_CONFIG: ${{ secrets.AGC_APP_RELEASE_CONFIG }}
43-
AGC_APP_DEBUG_CONFIG: ${{ secrets.AGC_APP_DEBUG_CONFIG }}
44-
run: |
45-
chmod +x ./gradlew
46-
mkdir ~/.android
47-
mkdir $GITHUB_WORKSPACE/distribution
48-
mkdir -p $GITHUB_WORKSPACE/mobile/src/huaweiDebug
49-
mkdir -p $GITHUB_WORKSPACE/mobile/src/huaweiRelease
50-
echo $JAVA_KEYSTORE_DEBUG > ~/.android/debug.keystore
51-
echo $JAVA_KEYSTORE_UPLOAD > ~/.android/upload.keystore
52-
echo $JAVA_KEYSTORE_PROPERTIES > $GITHUB_WORKSPACE/keystore.properties
53-
echo $AGC_API_CONFIG > $GITHUB_WORKSPACE/distribution/agc-apiclient.json
54-
echo $AGC_APP_DEBUG_CONFIG > $GITHUB_WORKSPACE/mobile/src/huaweiDebug/agconnect-services.json
55-
echo $AGC_APP_RELEASE_CONFIG > $GITHUB_WORKSPACE/mobile/src/huaweiRelease/agconnect-services.json
33+
java-version: '17'
5634

5735
- name: Build with Gradle
58-
env:
59-
AGC_PACKAGE_ID: ${{ secrets.AGC_PACKAGE_ID }}
6036
run: |
37+
chmod +x ./gradlew
6138
./gradlew :build
6239
cd ./build/libs
6340
ls -la | grep jar

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ buildscript {
3535
maven { url 'https://jitpack.io' }
3636
}
3737
dependencies {
38-
classpath "com.android.tools.build:gradle:8.11.0"
39-
classpath "com.huawei.agconnect:agcp:1.9.3.300"
38+
classpath "com.android.tools.build:gradle:8.11.1"
39+
classpath "com.huawei.agconnect:agcp:1.9.3.302"
4040
classpath "io.syslogic:agconnect-publishing-gradle-plugin:1.4.1"
4141
}
4242
}
@@ -73,13 +73,20 @@ plugins {
7373
````groovy
7474
/** Huawei AppGallery Connect: agc-apiclient.json */
7575
def json_agc = "distribution${File.separator}agconnect_apiclient.json"
76-
if (rootProject.file(json_agc).exists()) {
77-
agcPublishing {
78-
configFile = rootProject.file(json_agc).absolutePath
79-
releaseType = 1
80-
verbose = false
81-
logHttp = true
82-
}
76+
77+
agcPublishing {
78+
configFile = rootProject.file(json_agc).absolutePath
79+
releaseType = 1
80+
verbose = false
81+
logHttp = true
82+
}
83+
````
84+
85+
````kotlin
86+
configure<PublishingExtensionImpl> {
87+
configFile = rootProject.file(json_agc).absolutePath
88+
verbose = false
89+
logHttp = true
8390
}
8491
````
8592

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ gradlePlugin {
4343
}
4444
}
4545

46-
4746
tasks.withType<Test>().configureEach {
4847
useJUnitPlatform()
4948
}
@@ -62,7 +61,7 @@ val implCls: Configuration by configurations.creating {
6261
val javadocs by tasks.registering(Javadoc::class) {
6362
title = "${project.ext.get("plugin_display_name")} ${project.ext.get("plugin_version")} API"
6463
classpath += implCls.asFileTree.filter {it.extension == "jar"}
65-
setDestinationDir(project.file("/build/javadoc"))
64+
destinationDir = project.file("/build/javadoc")
6665
source = sourceSets.main.get().allJava
6766
// options.links = "https://docs.oracle.com/en/java/javase/17/docs/api/"
6867
// options.linkSource = true

settings.gradle.kts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
// settings.gradle.kts
2+
23
pluginManagement {
34
repositories {
4-
mavenCentral {
5-
content {
6-
includeGroupByRegex("org.apache.*")
7-
}
8-
}
95
gradlePluginPortal {
106
content {
117
excludeGroupByRegex("org.apache.*")
128
includeGroupByRegex("com.gradle.*")
139
}
1410
}
11+
mavenCentral {
12+
content {
13+
includeGroupByRegex("org.apache.*")
14+
}
15+
}
1516
}
1617
}
1718

0 commit comments

Comments
 (0)