diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml deleted file mode 100644 index 13abfe1..0000000 --- a/.github/workflows/android-build.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Android Build - -on: - push: - branches: - - main - pull_request: - -jobs: - build: - name: Build APK - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup JDK - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '17' - - - name: Setup Gradle cache - uses: gradle/gradle-build-action@v3 - - - name: Build APK - run: ./gradlew assembleDebug - - - name: Upload APK as Artifact - uses: actions/upload-artifact@v3 - with: - name: app-debug-apk - path: app/build/outputs/apk/debug/app-debug.apk diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml deleted file mode 100644 index 7cf4d99..0000000 --- a/.github/workflows/android.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Android CI - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - name: Build Signed APK - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup JDK - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '17' - - - name: Grant execute permission for Gradlew - run: chmod +x gradlew - - - name: Decode Keystore - run: | - echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > webKeyRL.jks - ls -la webKeyRL.jks # Vérification - - - name: Set environment variables - run: echo "SIGNING_STORE=webKeyRL.jks" >> $GITHUB_ENV - - - name: Build Signed APK - run: | - ./gradlew assembleRelease \ - -Pandroid.injected.signing.store.file=webKeyRL.jks \ - -Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} \ - -Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} \ - -Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }} - - - name: Upload APK as Artifact - uses: actions/upload-artifact@v4 - with: - name: app-release-apk - path: app/build/outputs/apk/release/app-release.apk diff --git a/.github/workflows/build_and_sign_apk.yml b/.github/workflows/build_and_sign_apk.yml new file mode 100644 index 0000000..0b57d5d --- /dev/null +++ b/.github/workflows/build_and_sign_apk.yml @@ -0,0 +1,44 @@ +name: Build and Sign APK + +on: + push: + branches: + - main # ou changez la branche selon vos besoins + pull_request: + +jobs: + build: + name: Build Signed APK + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: 11 + + - name: Grant execute permission for Gradle + run: chmod +x ./gradlew + + - name: Decode the keystore file + env: + KEYSTORE_BASE64: ${{ secrets.KEYSTORE_FILE }} + run: | + echo "$KEYSTORE_BASE64" | base64 --decode > keystore.jks + + - name: Build the signed APK + env: + KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + KEY_ALIAS: ${{ secrets.KEY_ALIAS }} + KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + run: ./gradlew assembleRelease + + - name: Upload APK as artifact + uses: actions/upload-artifact@v2 + with: + name: Signed-APK + path: app/build/outputs/apk/release/app-release.apk diff --git a/.idea/misc.xml b/.idea/misc.xml index bfef9bd..1880390 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,3 +1,4 @@ + @@ -9,7 +10,7 @@ diff --git a/app/build.gradle b/app/build.gradle index 079acb0..8de30a3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,10 +5,11 @@ plugins { android { signingConfigs { release { - storeFile file("app/webKeyRL.jks") - storePassword System.getenv("SIGNING_STORE_PASSWORD") ?: "password" - keyAlias System.getenv("SIGNING_KEY_ALIAS") ?: "alias" - keyPassword System.getenv("SIGNING_KEY_PASSWORD") ?: "password" + // Le keystore généré par GitHub Actions se trouve dans le répertoire racine de votre projet. + storeFile file("keystore.jks") + storePassword System.getenv("KEYSTORE_PASSWORD") ?: "default_password" + keyAlias System.getenv("KEY_ALIAS") ?: "default_alias" + keyPassword System.getenv("KEY_PASSWORD") ?: "default_key_password" } } namespace 'com.katsuu04.web' @@ -26,7 +27,9 @@ android { buildTypes { release { + // Utiliser la configuration de signature pour la version release signingConfig signingConfigs.release + // Vous pouvez activer ou non la minification/proguard selon vos besoins minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } @@ -38,16 +41,16 @@ android { } dependencies { - implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01" + implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-beta01" implementation 'com.google.android.play:app-update:2.1.0' implementation 'com.google.android.material:material:1.12.0' implementation "com.github.skydoves:colorpickerview:2.2.4" implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'com.github.bumptech.glide:glide:4.12.0' - implementation 'com.google.android.material:material:1.11.0' + implementation 'com.google.android.material:material:1.12.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' implementation 'androidx.appcompat:appcompat:1.7.0' - implementation 'androidx.constraintlayout:constraintlayout:2.2.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.2.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 8b2f3a6..735d1dd 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -22,7 +22,8 @@ android:fitsSystemWindows="true" android:orientation="vertical" tools:layout_editor_absoluteX="1dp" - tools:layout_editor_absoluteY="1dp"> + tools:layout_editor_absoluteY="1dp" + tools:ignore="UselessParent"> @@ -47,14 +49,16 @@ android:layout_weight="1" android:hint="@string/search_or_enter_url" android:inputType="textUri" + android:minHeight="48dp" android:padding="8dp" - android:singleLine="true" /> + android:singleLine="true" + android:textColorHint="#616161" />