Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #29

Closed
wants to merge 5 commits into from
Closed

Dev #29

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Android CI

on:
push:
branches: [master]
branches: [dev]

pull_request:
branches: [master]
Expand Down
38 changes: 35 additions & 3 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,28 +22,56 @@ 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()
applicationId = "io.github.k3ssdev.stacompanion"
minSdk = 29
targetSdk = 33
targetSdk = 34
versionCode = 1
versionName = "0.5-beta.1"
manifestPlaceholders["ADMOB_APP_ID"] = admobAppId
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

}



buildTypes {

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

}

testOptions {
unitTests.isIncludeAndroidResources = true
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand All @@ -51,13 +81,16 @@ android {
}

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



dependencies {

implementation("com.google.android.gms:play-services-ads:23.1.0")


implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
Expand All @@ -76,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
Loading