Use boilerplate instead of Android Studio generation
apk / build (push) Failing after 1m16s Details

This commit is contained in:
Michel Roux 2023-06-27 12:59:31 +02:00
parent 4e8dc03312
commit a1c54a9735
8 changed files with 52 additions and 96 deletions

11
.gitignore vendored
View File

@ -1,10 +1,5 @@
*.iml
.gradle
/local.properties
/.idea
.gradle/
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
build/
local.properties
.idea/

1
app/.gitignore vendored
View File

@ -1 +0,0 @@
/build

View File

@ -1,19 +1,24 @@
plugins {
id 'com.android.application'
}
apply plugin: 'com.android.application'
android {
namespace 'net.crystalyx.setaswallpaper'
compileSdkVersion 33
namespace "net.crystalyx.setaswallpaper"
defaultConfig {
applicationId "net.crystalyx.setaswallpaper"
minSdk 5
minSdkVersion 5
targetSdkVersion 33
versionCode 10
versionName "3.3"
versionCode 11
versionName "3.4"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (System.env.STORE_FILE) {
signingConfig signingConfigs.release
}
}
}
signingConfigs {
release {
if (System.env.STORE_FILE) {
@ -24,23 +29,4 @@ android {
}
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
if (System.env.STORE_FILE) {
signingConfig signingConfigs.release
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
tasks.withType(JavaCompile) {
options.deprecation = true
}

View File

@ -1,21 +1,10 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
# Add any project specific keep options here:

View File

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.crystalyx.setaswallpaper">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<application
android:icon="@mipmap/ic_launcher"
android:label="Set as wallpaper"
android:theme="@android:style/Theme.NoDisplay">
android:allowBackup="false"
android:theme="@android:style/Theme.NoDisplay"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".SetWallpaperActivity"
android:exported="true">

View File

@ -1,5 +1,25 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath('com.android.tools.build:gradle:8.0.2')
}
}
allprojects {
repositories {
mavenLocal()
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
tasks.withType(JavaCompile) {
options.deprecation = true
}

View File

@ -1,21 +0,0 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true

View File

@ -1,16 +1,3 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
// Boilerplate from https://transang.me/create-a-minimal-android-boilerplate-from-scratch/
rootProject.name = "SetAsWallpaper"
include ':app'