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

[MIGRATE] migrate project to Android Studio Version 3.0.1.0 #355

Open
wants to merge 1 commit into
base: master
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
72 changes: 9 additions & 63 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,63 +1,9 @@
# Created by .ignore support plugin (hsz.mobi)
### Android template
# Built application files
*.apk
*.ap_

# Files for the Dalvik VM
*.dex

### Android template
# Built application files
*.apk
*.ap_

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Java class files
*.class

# Generated files
bin/
gen/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed app/app-release.apk
Binary file not shown.
41 changes: 26 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,37 +1,48 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 25
buildToolsVersion '25'
compileSdkVersion 26
buildToolsVersion '27.0.1'
defaultConfig {
useLibrary 'org.apache.http.legacy'
manifestPlaceholders = [applicationName: "Odoo"]
applicationId "com.odoo"
minSdkVersion 14
targetSdkVersion 25
minSdkVersion 15
targetSdkVersion 22
versionCode 7
versionName "2.3.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
debug {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dataBinding {
enabled true
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.google.android.gms:play-services-gcm:10.0.1'
compile 'com.android.support:design:25.1.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation "com.android.support:appcompat-v7:$support_library_version"
implementation "com.android.support:cardview-v7:$support_library_version"
implementation "com.android.support:design:$support_library_version"
compile 'com.android.volley:volley:1.0.0'
compile project(':intro-slider-lib')
kapt "com.android.databinding:compiler:$gradle_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation project(':intro-slider-lib')
}
18 changes: 14 additions & 4 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,18 @@

##---------------End: proguard configuration for Gson ----------


-dontobfuscate
# Application Model Classes
-keep class * extends com.odoo.core.orm.OModel{*;}
# Searchview v4
-keep class android.support.v7.widget.SearchView { *; }

# Volley
-keep class com.android.volley.** { *; }
-keep interface com.android.volley.** { *; }

# Searchview v7
-keep class android.support.v7.widget.SearchView { *; }

# Odoo Framework
-keep class com.odoo.core.** { *; }
-keep interface com.odoo.core.** { *; }

-printmapping mapping.txt
Binary file added app/release/app-release.apk
Binary file not shown.
1 change: 1 addition & 0 deletions app/release/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":7},"path":"app-release.apk","properties":{"packageId":"com.odoo","split":"","minSdkVersion":"15"}}]
4 changes: 2 additions & 2 deletions app/src/main/java/com/odoo/OdooActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MenuItem;
Expand Down Expand Up @@ -246,7 +246,7 @@ private void loadDrawerItemInstance(Object instance, Bundle extra) {
if (cls.getSuperclass().isAssignableFrom(Activity.class)) {
intent = new Intent(this, cls);
}
if (cls.getSuperclass().isAssignableFrom(ActionBarActivity.class)) {
if (cls.getSuperclass().isAssignableFrom(AppCompatActivity.class)) {
intent = new Intent(this, cls);
}
if (intent != null) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/odoo/controls/OField.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private void init(Context context, AttributeSet attrs, int defStyleAttr,
mField_name = types.getString(R.styleable.OField_fieldName);
resId = types.getResourceId(R.styleable.OField_iconResource, 0);
showIcon = types.getBoolean(R.styleable.OField_showIcon, true);
tint_color = types.getColor(R.styleable.OField_iconTint, 0);
// tint_color = types.getColor(R.styleable.OField_iconTint, 0);
show_label = types.getBoolean(R.styleable.OField_showLabel, true);
int type_value = types.getInt(R.styleable.OField_fieldType, 0);
mType = FieldType.getTypeValue(type_value);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/odoo/controls/SearchableItemActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
Expand All @@ -49,7 +49,7 @@
import java.util.ArrayList;
import java.util.List;

public class SearchableItemActivity extends ActionBarActivity implements
public class SearchableItemActivity extends AppCompatActivity implements
AdapterView.OnItemClickListener, TextWatcher, View.OnClickListener,
OListAdapter.OnSearchChange, IOnQuickRecordCreateListener {
public static final String TAG = SearchableItemActivity.class.getSimpleName();
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<attr name="iconResource" format="reference" />
<attr name="showIcon" format="boolean" />
<attr name="showLabel" format="boolean" />
<attr name="iconTint" format="reference|color" />
<!--<attr name="iconTint" format="reference|color" />-->
<attr name="parsePattern" format="string" />
<attr name="withOutSidePadding" format="boolean" />
<attr name="fieldType">
Expand Down
17 changes: 15 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
gradle_version = '3.0.1'
support_library_version = '26.1.0'
kotlin_version = '1.1.60'
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath "com.android.tools.build:gradle:$gradle_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
####################################################################################################
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Nov 21 10:49:18 IST 2016
#Fri Nov 17 12:50:57 IST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
1 change: 1 addition & 0 deletions intro-slider-lib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Loading