Skip to content

Commit

Permalink
producFlavor created for debug apk
Browse files Browse the repository at this point in the history
  • Loading branch information
k3ssdev committed May 22, 2024
1 parent 633c601 commit 8cef6d5
Show file tree
Hide file tree
Showing 96 changed files with 1,815 additions and 2 deletions.
28 changes: 26 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ if (localPropertiesFile.exists()) {

val admobAppId = localProperties.getProperty("ADMOB_APP_ID", "valor_predeterminado")



plugins {
id("com.android.application")
}
Expand All @@ -20,7 +22,24 @@ android {
dataBinding {
enable = true
}

productFlavors {
create("stacompanion") {
dimension = "debug"
val appName = "stacompanion"
manifestPlaceholders["appName"] = appName
applicationIdSuffix = "beta"
versionName = "0.5"
versionNameSuffix = "1"
versionCode = (versionName + versionNameSuffix).replace(".", "").toInt()
val apkName = "${appName}_v$versionName-$applicationIdSuffix.$versionNameSuffix.apk"

// change app name block below
buildOutputs.all {
val variantOutputImpl = this as com.android.build.gradle.internal.api.BaseVariantOutputImpl
variantOutputImpl.outputFileName = apkName
}
}
}

defaultConfig {
manifestPlaceholders += mapOf()
Expand All @@ -34,14 +53,18 @@ android {

}



buildTypes {

release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}

}

testOptions {
Expand All @@ -58,9 +81,11 @@ android {
}

buildToolsVersion = "34.0.0"
flavorDimensions += listOf("debug")
}



dependencies {

implementation("com.google.android.gms:play-services-ads:23.1.0")
Expand All @@ -84,4 +109,3 @@ dependencies {
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package androidx.databinding;

public class DataBinderMapperImpl extends MergedDataBinderMapper {
DataBinderMapperImpl() {
addMapper(new io.github.k3ssdev.stacompanion.DataBinderMapperImpl());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package androidx.databinding;

public interface DataBindingComponent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package androidx.databinding.library.baseAdapters;

public class BR {
public static final int _all = 0;

public static final int othersViewModel = 1;

public static final int skillsViewModel = 2;

public static final int statusViewModel = 3;

public static final int viewModel = 4;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.github.k3ssdev.stacompanion;

public class BR {
public static final int _all = 0;

public static final int othersViewModel = 1;

public static final int skillsViewModel = 2;

public static final int statusViewModel = 3;

public static final int viewModel = 4;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
package io.github.k3ssdev.stacompanion;

import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.View;
import androidx.databinding.DataBinderMapper;
import androidx.databinding.DataBindingComponent;
import androidx.databinding.ViewDataBinding;
import io.github.k3ssdev.stacompanion.databinding.ActivityCharacterSheetEditBindingImpl;
import io.github.k3ssdev.stacompanion.databinding.FragmentCharacterSheetBindingImpl;
import io.github.k3ssdev.stacompanion.databinding.FragmentTabSheetDataBindingImpl;
import io.github.k3ssdev.stacompanion.databinding.FragmentTabSheetOthersBindingImpl;
import io.github.k3ssdev.stacompanion.databinding.FragmentTabSheetSkillsBindingImpl;
import io.github.k3ssdev.stacompanion.databinding.FragmentTabSheetStatusBindingImpl;
import java.lang.IllegalArgumentException;
import java.lang.Integer;
import java.lang.Object;
import java.lang.Override;
import java.lang.RuntimeException;
import java.lang.String;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class DataBinderMapperImpl extends DataBinderMapper {
private static final int LAYOUT_ACTIVITYCHARACTERSHEETEDIT = 1;

private static final int LAYOUT_FRAGMENTCHARACTERSHEET = 2;

private static final int LAYOUT_FRAGMENTTABSHEETDATA = 3;

private static final int LAYOUT_FRAGMENTTABSHEETOTHERS = 4;

private static final int LAYOUT_FRAGMENTTABSHEETSKILLS = 5;

private static final int LAYOUT_FRAGMENTTABSHEETSTATUS = 6;

private static final SparseIntArray INTERNAL_LAYOUT_ID_LOOKUP = new SparseIntArray(6);

static {
INTERNAL_LAYOUT_ID_LOOKUP.put(io.github.k3ssdev.stacompanion.R.layout.activity_character_sheet_edit, LAYOUT_ACTIVITYCHARACTERSHEETEDIT);
INTERNAL_LAYOUT_ID_LOOKUP.put(io.github.k3ssdev.stacompanion.R.layout.fragment_character_sheet, LAYOUT_FRAGMENTCHARACTERSHEET);
INTERNAL_LAYOUT_ID_LOOKUP.put(io.github.k3ssdev.stacompanion.R.layout.fragment_tab_sheet_data, LAYOUT_FRAGMENTTABSHEETDATA);
INTERNAL_LAYOUT_ID_LOOKUP.put(io.github.k3ssdev.stacompanion.R.layout.fragment_tab_sheet_others, LAYOUT_FRAGMENTTABSHEETOTHERS);
INTERNAL_LAYOUT_ID_LOOKUP.put(io.github.k3ssdev.stacompanion.R.layout.fragment_tab_sheet_skills, LAYOUT_FRAGMENTTABSHEETSKILLS);
INTERNAL_LAYOUT_ID_LOOKUP.put(io.github.k3ssdev.stacompanion.R.layout.fragment_tab_sheet_status, LAYOUT_FRAGMENTTABSHEETSTATUS);
}

@Override
public ViewDataBinding getDataBinder(DataBindingComponent component, View view, int layoutId) {
int localizedLayoutId = INTERNAL_LAYOUT_ID_LOOKUP.get(layoutId);
if(localizedLayoutId > 0) {
final Object tag = view.getTag();
if(tag == null) {
throw new RuntimeException("view must have a tag");
}
switch(localizedLayoutId) {
case LAYOUT_ACTIVITYCHARACTERSHEETEDIT: {
if ("layout/activity_character_sheet_edit_0".equals(tag)) {
return new ActivityCharacterSheetEditBindingImpl(component, view);
}
throw new IllegalArgumentException("The tag for activity_character_sheet_edit is invalid. Received: " + tag);
}
case LAYOUT_FRAGMENTCHARACTERSHEET: {
if ("layout/fragment_character_sheet_0".equals(tag)) {
return new FragmentCharacterSheetBindingImpl(component, view);
}
throw new IllegalArgumentException("The tag for fragment_character_sheet is invalid. Received: " + tag);
}
case LAYOUT_FRAGMENTTABSHEETDATA: {
if ("layout/fragment_tab_sheet_data_0".equals(tag)) {
return new FragmentTabSheetDataBindingImpl(component, view);
}
throw new IllegalArgumentException("The tag for fragment_tab_sheet_data is invalid. Received: " + tag);
}
case LAYOUT_FRAGMENTTABSHEETOTHERS: {
if ("layout/fragment_tab_sheet_others_0".equals(tag)) {
return new FragmentTabSheetOthersBindingImpl(component, view);
}
throw new IllegalArgumentException("The tag for fragment_tab_sheet_others is invalid. Received: " + tag);
}
case LAYOUT_FRAGMENTTABSHEETSKILLS: {
if ("layout/fragment_tab_sheet_skills_0".equals(tag)) {
return new FragmentTabSheetSkillsBindingImpl(component, view);
}
throw new IllegalArgumentException("The tag for fragment_tab_sheet_skills is invalid. Received: " + tag);
}
case LAYOUT_FRAGMENTTABSHEETSTATUS: {
if ("layout/fragment_tab_sheet_status_0".equals(tag)) {
return new FragmentTabSheetStatusBindingImpl(component, view);
}
throw new IllegalArgumentException("The tag for fragment_tab_sheet_status is invalid. Received: " + tag);
}
}
}
return null;
}

@Override
public ViewDataBinding getDataBinder(DataBindingComponent component, View[] views, int layoutId) {
if(views == null || views.length == 0) {
return null;
}
int localizedLayoutId = INTERNAL_LAYOUT_ID_LOOKUP.get(layoutId);
if(localizedLayoutId > 0) {
final Object tag = views[0].getTag();
if(tag == null) {
throw new RuntimeException("view must have a tag");
}
switch(localizedLayoutId) {
}
}
return null;
}

@Override
public int getLayoutId(String tag) {
if (tag == null) {
return 0;
}
Integer tmpVal = InnerLayoutIdLookup.sKeys.get(tag);
return tmpVal == null ? 0 : tmpVal;
}

@Override
public String convertBrIdToString(int localId) {
String tmpVal = InnerBrLookup.sKeys.get(localId);
return tmpVal;
}

@Override
public List<DataBinderMapper> collectDependencies() {
ArrayList<DataBinderMapper> result = new ArrayList<DataBinderMapper>(1);
result.add(new androidx.databinding.library.baseAdapters.DataBinderMapperImpl());
return result;
}

private static class InnerBrLookup {
static final SparseArray<String> sKeys = new SparseArray<String>(5);

static {
sKeys.put(0, "_all");
sKeys.put(1, "othersViewModel");
sKeys.put(2, "skillsViewModel");
sKeys.put(3, "statusViewModel");
sKeys.put(4, "viewModel");
}
}

private static class InnerLayoutIdLookup {
static final HashMap<String, Integer> sKeys = new HashMap<String, Integer>(6);

static {
sKeys.put("layout/activity_character_sheet_edit_0", io.github.k3ssdev.stacompanion.R.layout.activity_character_sheet_edit);
sKeys.put("layout/fragment_character_sheet_0", io.github.k3ssdev.stacompanion.R.layout.fragment_character_sheet);
sKeys.put("layout/fragment_tab_sheet_data_0", io.github.k3ssdev.stacompanion.R.layout.fragment_tab_sheet_data);
sKeys.put("layout/fragment_tab_sheet_others_0", io.github.k3ssdev.stacompanion.R.layout.fragment_tab_sheet_others);
sKeys.put("layout/fragment_tab_sheet_skills_0", io.github.k3ssdev.stacompanion.R.layout.fragment_tab_sheet_skills);
sKeys.put("layout/fragment_tab_sheet_status_0", io.github.k3ssdev.stacompanion.R.layout.fragment_tab_sheet_status);
}
}
}
Loading

0 comments on commit 8cef6d5

Please sign in to comment.