Browse Source

Updated dependencies and build tools to more recent version, upgrading our compile target to Android 9.

update-dependencies
Eric Kok 6 years ago
parent
commit
e4a93c316e
  1. 48
      app/build.gradle
  2. 4
      app/src/main/java/org/transdroid/core/gui/log/ErrorLogSender.java
  3. 4
      app/src/main/java/org/transdroid/core/gui/log/Log.java
  4. 2
      app/src/main/java/org/transdroid/core/gui/search/SearchActivity.java
  5. 5
      build.gradle
  6. 2
      gradle/wrapper/gradle-wrapper.properties

48
app/build.gradle

@ -1,28 +1,36 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android { android {
compileSdkVersion 25 compileSdkVersion 28
buildToolsVersion '25.0.3' buildToolsVersion '28.0.3'
useLibrary 'org.apache.http.legacy' useLibrary 'org.apache.http.legacy'
defaultConfig { defaultConfig {
minSdkVersion 15 minSdkVersion 15
targetSdkVersion 25 targetSdkVersion 28
versionCode 230 versionCode 230
versionName '2.5.10' versionName '2.5.10'
javaCompileOptions {
annotationProcessorOptions {
arguments = ["resourcePackageName": "org.transdroid"]
}
}
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled false
} }
} }
flavorDimensions "version"
productFlavors { productFlavors {
full { full {
dimension "version"
applicationId 'org.transdroid.full' applicationId 'org.transdroid.full'
resValue "string", "search_history_authority", applicationId + ".search.SearchHistoryProvider" resValue "string", "search_history_authority", applicationId + ".search.SearchHistoryProvider"
} }
lite { lite {
dimension "version"
applicationId 'org.transdroid.lite' applicationId 'org.transdroid.lite'
resValue "string", "search_history_authority", applicationId + ".search.SearchHistoryProvider" resValue "string", "search_history_authority", applicationId + ".search.SearchHistoryProvider"
} }
@ -33,26 +41,20 @@ android {
} }
dependencies { dependencies {
compile 'org.androidannotations:androidannotations-api:3.3.2' implementation 'org.androidannotations:androidannotations-api:4.4.0'
compile 'com.j256.ormlite:ormlite-core:4.48' implementation 'org.androidannotations:ormlite-api:4.4.0'
compile 'com.j256.ormlite:ormlite-android:4.48' implementation 'com.j256.ormlite:ormlite-core:4.48'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' implementation 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.android.support:appcompat-v7:23.4.0' implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.android.support:support-annotations:23.4.0' implementation 'com.android.support:appcompat-v7:28.0.0'
compile 'com.getbase:floatingactionbutton:1.10.1' implementation 'com.android.support:support-annotations:28.0.0'
compile 'com.nispok:snackbar:2.11.0' implementation 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.github.aegnor:rencode-java:cb628e824e' implementation 'com.nispok:snackbar:2.11.0'
compile('com.github.afollestad.material-dialogs:core:0.8.5.5@aar') { implementation 'com.github.aegnor:rencode-java:cb628e824e'
implementation('com.github.afollestad.material-dialogs:core:0.9.6.0@aar') {
transitive = true transitive = true
} }
apt 'org.androidannotations:androidannotations:3.3.2' annotationProcessor 'org.androidannotations:androidannotations:4.4.0'
annotationProcessor 'org.androidannotations:ormlite:4.4.0'
} }
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName 'org.transdroid'
//logLevel 'INFO'
//logFile '/Users/erickok/Dev/transdroid/transdroid/app/build/aa-log.txt'
}
}

4
app/src/main/java/org/transdroid/core/gui/log/ErrorLogSender.java

@ -21,7 +21,7 @@ import java.util.List;
import org.androidannotations.annotations.Bean; import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EBean; import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.OrmLiteDao; import org.androidannotations.ormlite.annotations.OrmLiteDao;
import org.transdroid.R; import org.transdroid.R;
import org.transdroid.core.app.settings.ServerSetting; import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.core.gui.navigation.NavigationHelper; import org.transdroid.core.gui.navigation.NavigationHelper;
@ -39,7 +39,7 @@ public class ErrorLogSender {
protected Log log; protected Log log;
@Bean @Bean
protected NavigationHelper navigationHelper; protected NavigationHelper navigationHelper;
@OrmLiteDao(helper = DatabaseHelper.class, model = ErrorLogEntry.class) @OrmLiteDao(helper = DatabaseHelper.class)
protected Dao<ErrorLogEntry, Integer> errorLogDao; protected Dao<ErrorLogEntry, Integer> errorLogDao;
public void collectAndSendLog(final Activity callingActivity, final ServerSetting serverSetting) { public void collectAndSendLog(final Activity callingActivity, final ServerSetting serverSetting) {

4
app/src/main/java/org/transdroid/core/gui/log/Log.java

@ -21,7 +21,7 @@ import com.j256.ormlite.stmt.DeleteBuilder;
import org.androidannotations.annotations.EBean; import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.EBean.Scope; import org.androidannotations.annotations.EBean.Scope;
import org.androidannotations.annotations.OrmLiteDao; import org.androidannotations.ormlite.annotations.OrmLiteDao;
import org.transdroid.BuildConfig; import org.transdroid.BuildConfig;
import java.util.Date; import java.util.Date;
@ -35,7 +35,7 @@ public class Log {
public static final String LOG_NAME = "Transdroid"; public static final String LOG_NAME = "Transdroid";
private static final long MAX_LOG_AGE = 15 * 60 * 1000; // 15 minutes private static final long MAX_LOG_AGE = 15 * 60 * 1000; // 15 minutes
@OrmLiteDao(helper = DatabaseHelper.class, model = ErrorLogEntry.class) @OrmLiteDao(helper = DatabaseHelper.class)
Dao<ErrorLogEntry, Integer> errorLogDao; Dao<ErrorLogEntry, Integer> errorLogDao;
protected void log(Object object, int priority, String message) { protected void log(Object object, int priority, String message) {

2
app/src/main/java/org/transdroid/core/gui/search/SearchActivity.java

@ -98,7 +98,7 @@ public class SearchActivity extends AppCompatActivity {
@AfterViews @AfterViews
protected void init() { protected void init() {
searchToolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha); searchToolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_material);
searchToolbar.setNavigationOnClickListener(new View.OnClickListener() { searchToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {

5
build.gradle

@ -1,15 +1,16 @@
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.0' classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
mavenLocal() mavenLocal()
maven { url "https://jitpack.io" } maven { url "https://jitpack.io" }

2
gradle/wrapper/gradle-wrapper.properties vendored

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip

Loading…
Cancel
Save