Skip to content

Commit bed769a

Browse files
authored
Merge pull request #220 from mjaun/feature/update_android
Update Android
2 parents 49db680 + dde4008 commit bed769a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+186
-222
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ insert_final_newline = true
1717
charset = utf-8
1818

1919
# Tab indentation
20-
[makefile,Makefile]
20+
[Makefile]
2121
indent_style = tab
2222
## PEP 0008 https://www.python.org/dev/peps/pep-0008/
2323
[*.py]

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
/local.properties
1313
/.idea/workspace.xml
1414
/.idea/libraries
15-
.DS_Store
1615
/build*
1716

1817
app/*.apk

app/build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 33
5-
64
defaultConfig {
75
applicationId "ch.logixisland.anuto"
8-
minSdkVersion 17
9-
targetSdkVersion 33
10-
versionCode 32
11-
versionName "0.11"
6+
compileSdk 34
7+
minSdkVersion 23
8+
targetSdkVersion 35
9+
versionCode 33
10+
versionName "0.12"
1211
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
1312
}
1413
buildTypes {
@@ -30,6 +29,6 @@ android {
3029

3130
dependencies {
3231
testImplementation 'junit:junit:4.13.2'
33-
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
34-
androidTestImplementation 'androidx.test:rules:1.5.0'
32+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
33+
androidTestImplementation 'androidx.test:rules:1.6.1'
3534
}

app/src/androidTest/java/ch/logixisland/anuto/DefaultGameSimulator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ private void tryEnhanceTower() {
125125

126126
while (iterator.hasNext()) {
127127
Tower tower = iterator.next();
128-
final int tier = mTowerTiers.getTowerTier(tower);
129128

130129
// check if enhancing is possible
131130
if (!tower.isEnhanceable()) {

app/src/androidTest/java/ch/logixisland/anuto/IntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package ch.logixisland.anuto;
22

3+
import androidx.test.ext.junit.rules.ActivityScenarioRule;
34
import androidx.test.filters.LargeTest;
4-
import androidx.test.rule.ActivityTestRule;
55
import androidx.test.ext.junit.runners.AndroidJUnit4;
66

77
import org.junit.Rule;
@@ -15,7 +15,7 @@
1515
public class IntegrationTest {
1616

1717
@Rule
18-
public ActivityTestRule<GameActivity> mActivityRule = new ActivityTestRule<>(GameActivity.class);
18+
public ActivityScenarioRule<GameActivity> mActivityRule = new ActivityScenarioRule<>(GameActivity.class);
1919

2020
@Test
2121
public void integrationTest() {

app/src/main/java/ch/logixisland/anuto/business/game/GameState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public interface Listener {
2323
private boolean mGameStarted = false;
2424
private int mFinalScore = 0;
2525

26-
private List<Listener> mListeners = new CopyOnWriteArrayList<>();
26+
private final List<Listener> mListeners = new CopyOnWriteArrayList<>();
2727

2828
public GameState(ScoreBoard scoreBoard, HighScores highScores, TowerSelector towerSelector) {
2929
mScoreBoard = scoreBoard;

app/src/main/java/ch/logixisland/anuto/business/game/MapInfo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
public class MapInfo {
44

5-
private String mMapId;
6-
private int mMapNameResId;
7-
private int mMapDataResId;
5+
private final String mMapId;
6+
private final int mMapNameResId;
7+
private final int mMapDataResId;
88

99
MapInfo(String mapId, int mapNameResId, int mapDataResId) {
1010
mMapId = mapId;

app/src/main/java/ch/logixisland/anuto/business/game/SaveGameRepository.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package ch.logixisland.anuto.business.game;
22

3-
import android.annotation.SuppressLint;
43
import android.content.Context;
54
import android.graphics.Bitmap;
65
import android.graphics.BitmapFactory;
@@ -54,7 +53,6 @@ public List<SaveGameInfo> getSaveGameInfos() {
5453
public SaveGameInfo createSaveGame(Bitmap screenshot, int score, int wave, int lives) {
5554
Date date = new Date();
5655

57-
@SuppressLint("SimpleDateFormat")
5856
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
5957
File folder = new File(mContext.getFilesDir() + File.separator
6058
+ "savegame" + File.separator

app/src/main/java/ch/logixisland/anuto/business/tower/TowerInfo.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99

1010
public class TowerInfo {
1111

12-
private int mValue;
13-
private int mLevel;
14-
private int mLevelMax;
15-
private boolean mEnhanceable;
16-
private int mEnhanceCost;
17-
private boolean mUpgradeable;
18-
private int mUpgradeCost;
19-
private boolean mSellable;
20-
private boolean mCanLockTarget;
12+
private final int mValue;
13+
private final int mLevel;
14+
private final int mLevelMax;
15+
private final boolean mEnhanceable;
16+
private final int mEnhanceCost;
17+
private final boolean mUpgradeable;
18+
private final int mUpgradeCost;
19+
private final boolean mSellable;
20+
private final boolean mCanLockTarget;
2121
private boolean mDoesLockTarget;
22-
private boolean mHasStrategy;
22+
private final boolean mHasStrategy;
2323
private TowerStrategy mStrategy;
24-
private List<TowerInfoValue> mProperties;
24+
private final List<TowerInfoValue> mProperties;
2525

2626
public TowerInfo(Tower tower, int credits, boolean controlsEnabled) {
2727
mValue = tower.getValue();

app/src/main/java/ch/logixisland/anuto/business/tower/TowerInserter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public interface Listener {
3131

3232
private Tower mInsertedTower;
3333
private Plateau mCurrentPlateau;
34-
private Collection<Listener> mListeners = new CopyOnWriteArrayList<>();
34+
private final Collection<Listener> mListeners = new CopyOnWriteArrayList<>();
3535

3636
public TowerInserter(GameEngine gameEngine, GameState gameState, EntityRegistry entityRegistry,
3737
TowerSelector towerSelector, TowerAging towerAging, ScoreBoard scoreBoard) {

0 commit comments

Comments
 (0)