Compare commits

..

6 Commits

Author SHA1 Message Date
OMGeeky
a317d8d59f Changed lint.xml to include StringFormatMatches and StringFormatInvalid
(cherry picked from commit 8e393b93d8)
2022-10-11 18:29:14 +02:00
OMGeeky
1dac8162a9 Configured lint-baseline file (for automatic builds on github)
(cherry picked from commit 3289bd6fb1)
2022-10-11 18:29:14 +02:00
OMGeeky
bdad5c721f Fixed problems with older Android versions (below Android 7)
(cherry picked from commit 6946b1f2b3)
2022-10-11 18:29:14 +02:00
OMGeeky
04ce2efffb Create build Action
(cherry picked from commit 462b605921)
(cherry picked from commit 112301c444)
2022-10-11 18:29:13 +02:00
OMGeeky
171dfe4d46 Migrate to AndroidX
(cherry picked from commit f50e4f1d38)
2022-10-11 18:29:13 +02:00
OMGeeky
1e4aaec675 Removed ignored files
(cherry picked from commit d623c22b38)
2022-10-11 18:29:13 +02:00
30 changed files with 72 additions and 162 deletions

34
.github/workflows/gradle2.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build Gradle
on: workflow_dispatch
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1.0.4
- name: Make gradle wrapper executable
run: chmod +x ./AndorsTrail/gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v2.3.2
with:
arguments: build
build-root-directory: ./AndorsTrail

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

View File

@@ -1,6 +1,10 @@
apply plugin: 'com.android.application'
android {
lintOptions{
baseline file("lint.xml")
abortOnError true
}
compileSdkVersion 30
buildToolsVersion "30.0.3"
@@ -12,19 +16,14 @@ android {
buildTypes {
release {
manifestPlaceholders icon_name: 'icon', fileproviderPath: 'AndorsTrail'
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
manifestPlaceholders icon_name: 'icon_beta', fileproviderPath: 'AndorsTrail.beta2'
applicationIdSuffix 'beta2'
}
}
}
dependencies {
implementation 'com.android.support:support-v4:28.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
}
task copyRes(type: Copy) {

View File

@@ -9,5 +9,7 @@
<issue id="IconLocation" severity="ignore" />
<issue id="UnusedResources" severity="ignore" />
<issue id="DefaultLocale" severity="ignore" />
<issue id="StringFormatInvalid" severity="ignore" />
<issue id="StringFormatMatches" severity="ignore" />
<issue id="NewApi" severity="error" />
</lint>

View File

@@ -27,7 +27,7 @@
<application
android:name="com.gpl.rpg.AndorsTrail.AndorsTrailApplication"
android:label="@string/app_name"
android:icon="@drawable/${icon_name}"
android:icon="@drawable/icon"
android:description="@string/app_description"
android:allowBackup="true"
android:theme="@style/AndorsTrailTheme_Blue"
@@ -66,8 +66,8 @@
<activity android:name="com.gpl.rpg.AndorsTrail.activity.DisplayWorldMapActivity" />
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:name="androidx.core.content.FileProvider"
android:authorities="com.gpl.rpg.AndorsTrail.fileprovider"
android:grantUriPermissions="true"
android:exported="false">
<meta-data

View File

@@ -15,7 +15,7 @@ import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;

View File

@@ -1,7 +1,7 @@
package com.gpl.rpg.AndorsTrail.activity;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import androidx.fragment.app.FragmentActivity;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;

View File

@@ -2,7 +2,7 @@ package com.gpl.rpg.AndorsTrail.activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.FragmentTabHost;
import androidx.fragment.app.FragmentTabHost;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ImageView;

View File

@@ -2,7 +2,7 @@ package com.gpl.rpg.AndorsTrail.activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.FragmentTabHost;
import androidx.fragment.app.FragmentTabHost;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ImageView;

View File

@@ -20,8 +20,8 @@ import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager.OnBackStackChangedListener;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager.OnBackStackChangedListener;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewTreeObserver;

View File

@@ -5,7 +5,7 @@ import java.util.Arrays;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;

View File

@@ -8,7 +8,7 @@ import java.util.Map;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View File

@@ -5,7 +5,7 @@ import java.util.ArrayList;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View File

@@ -5,7 +5,7 @@ import java.util.ArrayList;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;

View File

@@ -4,7 +4,7 @@ import java.util.HashSet;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View File

@@ -12,7 +12,7 @@ import android.content.SharedPreferences.Editor;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;

View File

@@ -3,7 +3,7 @@ package com.gpl.rpg.AndorsTrail.activity.fragment;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;

View File

@@ -4,7 +4,7 @@ import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.support.v4.content.FileProvider;
import androidx.core.content.FileProvider;
import com.gpl.rpg.AndorsTrail.controller.Constants;
@@ -99,9 +99,7 @@ public final class AndroidStorage {
public static String getUrlForFile(Context context, File worldmap) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
String applicationId = context.getPackageName();
// Uri uri = FileProvider.getUriForFile(context, "com.gpl.rpg.AndorsTrail.fileprovider", worldmap);
Uri uri = FileProvider.getUriForFile(context, applicationId + ".fileprovider", worldmap);
Uri uri = FileProvider.getUriForFile(context, "com.gpl.rpg.AndorsTrail.fileprovider", worldmap);
return uri.toString();
} else {
return "file://" + worldmap.getAbsolutePath();

View File

@@ -0,0 +1,2 @@
android.enableJetifier=true
android.useAndroidX=true

View File

@@ -1,7 +0,0 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
#
#Sun Sep 25 12:50:59 CEST 2022
sdk.dir=C\:\\Users\\chris\\AppData\\Local\\Android\\Sdk

View File

@@ -415,6 +415,16 @@
{
"id":"sullengard_mayor",
"replies":[
{
"nextPhraseID":"sullengard_mayor_5",
"requires":[
{
"requireType":"factionScore",
"requireID":"gold_contribute",
"value":50000
}
]
},
{
"nextPhraseID":"sullengard_mayor_10",
"requires":[
@@ -461,16 +471,6 @@
}
]
},
{
"nextPhraseID":"sullengard_mayor_5",
"requires":[
{
"requireType":"factionScore",
"requireID":"gold_contribute",
"value":50000
}
]
},
{
"nextPhraseID":"sullengard_mayor_1"
}
@@ -6505,23 +6505,6 @@
{
"text":"Can you tell me about your 'business agreement' with your beer 'distributors'?",
"nextPhraseID":"sullengard_mayor_beer"
},
{
"text":"We want to contribute gold coins for your financial loss.",
"nextPhraseID":"sullengard_mayor_4",
"requires":[
{
"requireType":"factionScore",
"requireID":"gold_contribute",
"value":50000,
"negate":true
},
{
"requireType":"questProgress",
"requireID":"Thieves04",
"value":70
}
]
}
]
},
@@ -6532,50 +6515,16 @@
{
"text":"How did you know that?",
"nextPhraseID":"sullengard_mayor_beer_letter_not_delivered_10"
},
{
"text":"We want to contribute gold coins for your financial loss.",
"nextPhraseID":"sullengard_mayor_4",
"requires":[
{
"requireType":"factionScore",
"requireID":"gold_contribute",
"value":50000,
"negate":true
},
{
"requireType":"questProgress",
"requireID":"Thieves04",
"value":70
}
]
}
]
},
{
"id":"sullengard_mayor_letter_delivered",
"message":"Thank you for delivering my letter to Kealwea.",
"message":"Than you for delivering my letter to Kealwea.",
"replies":[
{
"text":"How did you know?",
"nextPhraseID":"sullengard_mayor_beer_50"
},
{
"text":"We want to contribute gold coins for your financial loss.",
"nextPhraseID":"sullengard_mayor_4",
"requires":[
{
"requireType":"factionScore",
"requireID":"gold_contribute",
"value":50000,
"negate":true
},
{
"requireType":"questProgress",
"requireID":"Thieves04",
"value":70
}
]
}
]
},