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

upgrade AGP to 7.4.2 #10

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
21 changes: 11 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ apply plugin: 'com.android.application'
// Define scout.url in your local.properties file
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def url = properties.getProperty('scout.url');
def url = properties.getProperty('scout.url')

android {
compileSdkVersion 28
compileSdkVersion 33
defaultConfig {
applicationId "com.example.axddandroid"
minSdkVersion 19
targetSdkVersion 28
targetSdkVersion 33
versionCode 2
versionName "1.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -22,6 +22,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
namespace 'edu.uw.UWScout'
}

repositories {
Expand All @@ -30,14 +31,14 @@ repositories {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'com.basecamp:turbolinks:1.0.9'
}
7 changes: 3 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uw.UWScout">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand All @@ -18,8 +17,8 @@
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
android:screenOrientation="fullSensor"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
28 changes: 13 additions & 15 deletions app/src/main/java/edu/uw/UWScout/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

import com.google.android.material.bottomnavigation.BottomNavigationView;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.annotation.NonNull;

import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.FrameLayout;
import com.google.android.material.bottomnavigation.BottomNavigationView;

public class MainActivity extends AppCompatActivity {

Expand Down Expand Up @@ -68,10 +66,10 @@ protected void onCreate(Bundle savedInstanceState) {
location = new ScoutLocation(this);

scoutPages = new ScoutPage[4];
scoutPages[0] = new ScoutPage(this, (FrameLayout) findViewById(R.id.main_frame), selectedCampus, "", location);
scoutPages[1] = new ScoutPage(this, (FrameLayout) findViewById(R.id.main_frame), selectedCampus, "food/", location);
scoutPages[2] = new ScoutPage(this, (FrameLayout) findViewById(R.id.main_frame), selectedCampus, "study/", location);
scoutPages[3] = new ScoutPage(this, (FrameLayout) findViewById(R.id.main_frame), selectedCampus, "tech/", location);
scoutPages[0] = new ScoutPage(this, findViewById(R.id.main_frame), selectedCampus, "", location);
scoutPages[1] = new ScoutPage(this, findViewById(R.id.main_frame), selectedCampus, "food/", location);
scoutPages[2] = new ScoutPage(this, findViewById(R.id.main_frame), selectedCampus, "study/", location);
scoutPages[3] = new ScoutPage(this, findViewById(R.id.main_frame), selectedCampus, "tech/", location);
}

public void submitFilters(View view) {
Expand Down Expand Up @@ -111,10 +109,10 @@ public void run() {
scoutPages[1].disable();
scoutPages[2].disable();
scoutPages[3].disable();
scoutPages[0] = new ScoutPage(context, (FrameLayout) findViewById(R.id.main_frame), campus_options[item], "", location);
scoutPages[1] = new ScoutPage(context, (FrameLayout) findViewById(R.id.main_frame), campus_options[item], "food/", location);
scoutPages[2] = new ScoutPage(context, (FrameLayout) findViewById(R.id.main_frame), campus_options[item], "study/", location);
scoutPages[3] = new ScoutPage(context, (FrameLayout) findViewById(R.id.main_frame), campus_options[item], "tech/", location);
scoutPages[0] = new ScoutPage(context, findViewById(R.id.main_frame), campus_options[item], "", location);
scoutPages[1] = new ScoutPage(context, findViewById(R.id.main_frame), campus_options[item], "food/", location);
scoutPages[2] = new ScoutPage(context, findViewById(R.id.main_frame), campus_options[item], "study/", location);
scoutPages[3] = new ScoutPage(context, findViewById(R.id.main_frame), campus_options[item], "tech/", location);
switchToPage(scoutPages[0]);
}
});
Expand Down
5 changes: 1 addition & 4 deletions app/src/main/java/edu/uw/UWScout/ScoutLocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,7 @@ protected boolean isBetterLocation(Location location, Location currentBestLocati
return true;
} else if (isNewer && !isLessAccurate) {
return true;
} else if (isNewer && !isSignificantlyLessAccurate && isFromSameProvider) {
return true;
}
return false;
} else return isNewer && !isSignificantlyLessAccurate && isFromSameProvider;
}

/** Checks whether two providers are the same */
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/edu/uw/UWScout/ScoutPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private void initView() {
private Context context;
private boolean inFilterMode = false;
private String filterParams = "";
public ScoutLocation location = null;
public ScoutLocation location;

ScoutPage(Context context, FrameLayout parentComponent, String campus, String subUrl, ScoutLocation location) {
this.parentComponent = parentComponent;
Expand Down Expand Up @@ -212,7 +212,7 @@ public void visitCompleted() {
public void visitProposedToLocationWithAction(String location, String action) {
if (pageInstances.peek().turbolinksSession.getWebView().getUrl().matches(".*/[0-9]+/.*")) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(location));
((Activity) context).startActivity(browserIntent);
context.startActivity(browserIntent);
}
else {
stackPageInstance(location);
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:8.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -23,6 +23,6 @@ allprojects {
}
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ org.gradle.jvmargs=-Xmx1536m
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.enableJetifier=false
org.gradle.unsafe.configuration-cache=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Sep 23 09:03:24 PDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Loading