Skip to content

Commit 5c1d982

Browse files
committed
AGP 8.12.0
2 parents ddbb487 + 2abcec5 commit 5c1d982

File tree

4 files changed

+56
-2
lines changed

4 files changed

+56
-2
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
mkdir build
4848
chmod +x ./gradlew
4949
PLUGIN_VERSION=$(cat ./gradle/libs.versions.toml | grep plugin_version | grep -Po '[\d.]+' | head -n1)
50-
PACKAGE=https://maven.pkg.github.com/${{ env.GITHUB_ACTOR }}/${{ env.PLUGIN_NAME }}/${{ env.PLUGIN_NS }}/${{ env.PLUGIN_NAME }}/$PLUGIN_VERSION/${{ env.PLUGIN_NAME }}-$PLUGIN_VERSION.jar
50+
PACKAGE=https://maven.pkg.github.com/${{ env.GITHUB_ACTOR }}/${{ env.PLUGIN_NAME }}/${{ env.PLUGIN_NS }}/${{ env.PLUGIN_NAME }}/${PLUGIN_VERSION}/${{ env.PLUGIN_NAME }}-${PLUGIN_VERSION}.jar
5151
if wget --user ${{ env.GITHUB_ACTOR }} --password ${{ env.GITHUB_TOKEN }} -q --method=HEAD $PACKAGE; then
5252
echo "::notice::Version $PLUGIN_VERSION already published."
5353
echo "PUBLISHED=true" >> "$GITHUB_ENV"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ configure<PublishingExtensionImpl> {
9292

9393
This configuration is entirely optional, while providing the config file at the default location:
9494

95-
`distribution/agconnect_apiclient.json`.
95+
- `distribution/agconnect_apiclient.json`.
9696

9797
### Plugin Tasks
9898

screenshots/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/repository.xcf
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package io.syslogic.agconnect;
2+
3+
import org.gradle.testkit.runner.BuildResult;
4+
import org.gradle.testkit.runner.GradleRunner;
5+
import org.junit.jupiter.api.Assertions;
6+
import org.junit.jupiter.api.BeforeEach;
7+
import org.junit.jupiter.api.Test;
8+
9+
import java.io.BufferedWriter;
10+
import java.io.File;
11+
import java.io.FileWriter;
12+
import java.io.IOException;
13+
import java.util.List;
14+
15+
/**
16+
* AGConnect Publishing Test
17+
* @author Martin Zeitler
18+
*/
19+
class PublishingTest {
20+
21+
GradleRunner runner;
22+
List<String> buildArgs = List.of(":build");
23+
24+
/**
25+
* Setting up {@link GradleRunner}, when running from directory `buildSrc`.
26+
* Eventually could also copy to @tmpDir and then inject the configuration.
27+
*/
28+
@BeforeEach
29+
public void setup() {
30+
if (new File("").getAbsoluteFile().getName().equals("buildSrc")) {
31+
this.runner = GradleRunner.create()
32+
.withProjectDir(new File("../"))
33+
.withPluginClasspath()
34+
.withDebug(true)
35+
.forwardOutput();
36+
} else {
37+
// This needs a Huawei Android project to test with.
38+
}
39+
}
40+
41+
@Test
42+
public void testLibraryBuild() {
43+
BuildResult result = this.runner.withArguments(this.buildArgs).build();
44+
Assertions.assertNotNull(result);
45+
Assertions.assertTrue(result.getOutput().contains("BUILD SUCCESSFUL"));
46+
}
47+
48+
private void writeFile(File destination, String content) throws IOException {
49+
try (BufferedWriter output = new BufferedWriter(new FileWriter(destination))) {
50+
output.write(content);
51+
}
52+
}
53+
}

0 commit comments

Comments
 (0)