Build 2026: AGP 9.4.1 + Gradle 9.6, compileSdk 37/target 36, minSdk 26, AndroidX y AdMob 25.5.0 al día, firma release vía keystore.properties
This commit is contained in:
1 parent
592e96366d
commit
cab30c2a98
11 files changed
+113
-102
No files matched your search
@@ -1,6 +1,7 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/keystore.properties
|
||||
/.idea/workspace.xml
|
||||
/.idea/libraries
|
||||
.DS_Store
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Copia este fichero como admob.xml (gitignored) con tus IDs reales de AdMob.
|
||||
La app no compila sin él: AndroidManifest y activity_main lo referencian. -->
|
||||
<!-- IDs de TEST públicos de Google: no producen ingresos ni violan política -->
|
||||
<string name="admob_launch_api">ca-app-pub-3940256099942544~3347511713</string>
|
||||
<string name="banner_ad_unit_id">ca-app-pub-3940256099942544/6300978111</string>
|
||||
</resources>
|
||||
+45
-20
@@ -1,45 +1,70 @@
|
||||
apply plugin: 'com.android.application'
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
// Credenciales de firma de release: viven en keystore.properties (ignorado por git).
|
||||
// Si el fichero no existe el build sigue funcionando (release sin firmar).
|
||||
def keystorePropsFile = rootProject.file('keystore.properties')
|
||||
def keystoreProps = new Properties()
|
||||
if (keystorePropsFile.exists()) {
|
||||
keystoreProps.load(new FileInputStream(keystorePropsFile))
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.jkanetwork.st.calendariodefrases'
|
||||
compileSdk 37
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.jkanetwork.st.calendariodefrases"
|
||||
minSdkVersion 21
|
||||
compileSdk 34
|
||||
targetSdkVersion 34
|
||||
minSdk 26
|
||||
targetSdk 36
|
||||
versionName "1.3.5"
|
||||
// Sube automáticamente la build en cada
|
||||
// Sube automáticamente la build en cada compilación
|
||||
def versionPropsFile = file('version.count')
|
||||
def Properties versionProps = new Properties()
|
||||
|
||||
versionProps.load(new FileInputStream(versionPropsFile))
|
||||
|
||||
def code = versionProps['VERSION_CODE'].toInteger() + 1
|
||||
versionCode code
|
||||
versionProps['VERSION_CODE'] = code.toString()
|
||||
versionProps.store(versionPropsFile.newWriter(), null)
|
||||
versionCode code
|
||||
// Fin de subida automática de build
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
if (keystorePropsFile.exists()) {
|
||||
storeFile file(keystoreProps['storeFile'])
|
||||
storePassword keystoreProps['storePassword']
|
||||
keyAlias keystoreProps['keyAlias']
|
||||
keyPassword keystoreProps['keyPassword']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
if (keystorePropsFile.exists()) {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace 'com.jkanetwork.st.calendariodefrases'
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
/*androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})*/
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.core:core:1.12.0'
|
||||
implementation 'com.google.android.material:material:1.11.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.8.0'
|
||||
implementation 'androidx.core:core:1.19.1'
|
||||
implementation 'androidx.work:work-runtime:2.12.0'
|
||||
implementation 'com.github.marcohc:robotocalendarview:3.1.1'
|
||||
implementation 'com.google.android.gms:play-services-ads:23.0.0'
|
||||
//compile 'com.tappx.sdk.android:tappx-sdk:3.+'
|
||||
//testImplementation 'junit:junit:4.12'
|
||||
implementation 'com.google.android.gms:play-services-ads:25.5.0'
|
||||
implementation 'com.google.android.ump:user-messaging-platform:4.0.0'
|
||||
}
|
||||
@@ -84,25 +84,25 @@ public class FavsActivity extends AppCompatActivity {
|
||||
@SuppressWarnings("unchecked") /* Because next line has a type change without checking it */
|
||||
HashMap<String, String> obj = (HashMap<String,String>) listFavs.getItemAtPosition(info.position);
|
||||
|
||||
switch (item.getItemId()) {
|
||||
case R.id.copy:
|
||||
ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
clipboard.setPrimaryClip(ClipData.newPlainText("Sentence", obj.get("item")+this.getString(R.string.sharefrom)));
|
||||
Toast.makeText(getApplicationContext(), "Copiado al portapapeles", Toast.LENGTH_LONG ).show();
|
||||
return true;
|
||||
case R.id.delfav:
|
||||
Integer[] IDFavs = db.getIDFavs();
|
||||
db.delFav(IDFavs[info.position]);
|
||||
/* Restart activity for refresh favs */
|
||||
finish();
|
||||
startActivity(getIntent());
|
||||
return true;
|
||||
case R.id.share:
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setType("text/plain");
|
||||
intent.putExtra(Intent.EXTRA_TEXT,obj.get("item")+this.getString(R.string.sharefrom));
|
||||
startActivity(Intent.createChooser(intent, "Compartir con"));
|
||||
return true;
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.copy) {
|
||||
ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
clipboard.setPrimaryClip(ClipData.newPlainText("Sentence", obj.get("item")+this.getString(R.string.sharefrom)));
|
||||
Toast.makeText(getApplicationContext(), "Copiado al portapapeles", Toast.LENGTH_LONG ).show();
|
||||
return true;
|
||||
} else if (id == R.id.delfav) {
|
||||
Integer[] IDFavs = db.getIDFavs();
|
||||
db.delFav(IDFavs[info.position]);
|
||||
/* Restart activity for refresh favs */
|
||||
finish();
|
||||
startActivity(getIntent());
|
||||
return true;
|
||||
} else if (id == R.id.share) {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setType("text/plain");
|
||||
intent.putExtra(Intent.EXTRA_TEXT,obj.get("item")+this.getString(R.string.sharefrom));
|
||||
startActivity(Intent.createChooser(intent, "Compartir con"));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -56,24 +56,20 @@ public class MainActivity extends AppCompatActivity implements RobotoCalendarLis
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.favorites:
|
||||
Intent newIF= new Intent(MainActivity.this,FavsActivity.class);
|
||||
startActivity(newIF);
|
||||
return true;
|
||||
case R.id.options:
|
||||
Intent newIO= new Intent(MainActivity.this,OptsActivity.class);
|
||||
startActivity(newIO);
|
||||
return true;
|
||||
case R.id.about:
|
||||
Intent newIA= new Intent(MainActivity.this,AboutOfActivity.class);
|
||||
startActivity(newIA);
|
||||
return true;
|
||||
case R.id.exit:
|
||||
moveTaskToBack(true); /* Returns to "desktop" */
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.favorites) {
|
||||
startActivity(new Intent(MainActivity.this, FavsActivity.class));
|
||||
return true;
|
||||
} else if (id == R.id.options) {
|
||||
startActivity(new Intent(MainActivity.this, OptsActivity.class));
|
||||
return true;
|
||||
} else if (id == R.id.about) {
|
||||
startActivity(new Intent(MainActivity.this, AboutOfActivity.class));
|
||||
return true;
|
||||
} else if (id == R.id.exit) {
|
||||
moveTaskToBack(true); /* Returns to "desktop" */
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
#Sun Apr 07 14:20:00 CEST 2024
|
||||
VERSION_CODE=353
|
||||
#Tue Oct 20 12:44:21 UTC 2026
|
||||
VERSION_CODE=361
|
||||
+2
-26
@@ -1,28 +1,4 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.3.0'
|
||||
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
google()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tasks.register('clean', Delete) {
|
||||
delete rootProject.buildDir
|
||||
plugins {
|
||||
id 'com.android.application' version '9.4.1' apply false
|
||||
}
|
||||
+7
-17
@@ -1,21 +1,11 @@
|
||||
# Project-wide Gradle settings.
|
||||
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# JVM arguments for the daemon process.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
|
||||
# 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.
|
||||
android.enableJetifier=true
|
||||
android.nonFinalResIds=false
|
||||
android.nonTransitiveRClass=false
|
||||
# AndroidX
|
||||
android.useAndroidX=true
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
|
||||
# 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
|
||||
# R fields deben ser final: el código Java usa switch(view.getId())/menu items
|
||||
android.nonFinalResIds=false
|
||||
# Necesario mientras se use robotocalendarview (lib pre-AndroidX, se jetifica en build)
|
||||
android.enableJetifier=true
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -1 +1,16 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
}
|
||||
include ':app'
|
||||
Reference in new issue
Block a user