Skip to content

Commit ad03071

Browse files
authored
Merge pull request #5 from approov/feature/3.5.0-fixes
Update gradle to latest version; add github action to build only bran…
2 parents c936d8c + feb1276 commit ad03071

File tree

4 files changed

+80
-3
lines changed

4 files changed

+80
-3
lines changed

.github/workflows/build_only.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Build Only
2+
3+
on:
4+
push:
5+
branches:
6+
- 'feature/**'
7+
8+
jobs:
9+
build-test:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 30
12+
env:
13+
WORKSPACE: "${{ github.workspace }}"
14+
GIT_BRANCH: "${{ github.ref }}"
15+
CURRENT_TAG: "${{ github.ref_name }}"
16+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
17+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
18+
PGP_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
19+
PGP_KEY_ID: ${{ secrets.PGP_KEY_ID }}
20+
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
21+
steps:
22+
- name: Set up Git
23+
run: git config --global --add safe.directory '*'
24+
25+
- name: Checkout Repository
26+
uses: actions/checkout@v4
27+
28+
- name: Set Up Java
29+
uses: actions/setup-java@v4
30+
with:
31+
distribution: 'temurin' # Use Eclipse Temurin distribution
32+
java-version: '21' # Use Java 21 for Android builds
33+
34+
- name: Install Android SDK
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y unzip curl
38+
mkdir -p $ANDROID_HOME/cmdline-tools
39+
curl -o android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip
40+
unzip -q android-sdk.zip -d $ANDROID_HOME/cmdline-tools
41+
mv $ANDROID_HOME/cmdline-tools/cmdline-tools $ANDROID_HOME/cmdline-tools/tools
42+
rm android-sdk.zip
43+
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
44+
echo "PATH=$ANDROID_HOME/cmdline-tools/tools/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH" >> $GITHUB_ENV
45+
- name: Accept Android SDK Licenses
46+
shell: bash
47+
run: |
48+
source $GITHUB_ENV
49+
yes | sdkmanager --licenses || true
50+
- name: Install Required SDK Packages
51+
shell: bash
52+
run: |
53+
source $GITHUB_ENV
54+
sdkmanager "platform-tools" "platforms;android-33" "build-tools;33.0.2"
55+
56+
57+
- name: Install GPG
58+
run: |
59+
sudo apt-get update
60+
sudo apt-get install -y gnupg
61+
62+
- name: Import GPG Private Key
63+
run: |
64+
echo "${{ secrets.GPG_PRIVATE_KEY }}" > private.key
65+
gpg --batch --import private.key
66+
rm private.key
67+
68+
- name: Trust GPG Key
69+
run: |
70+
KEY_ID=$(gpg --list-keys --with-colons | grep pub | cut -d: -f5)
71+
echo -e "trust\n5\ny\nquit" | gpg --batch --yes --command-fd 0 --edit-key $KEY_ID
72+
73+
- name: Build AAR
74+
run: ./gradlew assembleRelease
75+
76+
- name: Create Package
77+
run: cd .maven && ./build-and-sign.sh

approov-service/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ plugins {
66
repositories {
77
mavenCentral()
88
google()
9-
jcenter()
109
}
1110

1211
group = 'com.github.approov'
1312

1413
android {
14+
namespace = 'io.approov.service.httpsurlconn'
1515
compileSdkVersion 30
1616

1717
defaultConfig {

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:7.1.1'
8+
classpath 'com.android.tools.build:gradle:8.9.0'
99
}
1010
}
1111

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip

0 commit comments

Comments
 (0)