Skip to content

Commit

Permalink
update gradle and butterKnife
Browse files Browse the repository at this point in the history
  • Loading branch information
azizymahsa committed Aug 11, 2018
1 parent 9939e10 commit 1a5b67f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 28 deletions.
21 changes: 11 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'


defaultConfig {
applicationId "com.example.windview"
Expand All @@ -21,16 +21,17 @@ android {
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support:design:27.1.1'
compile 'com.android.support:cardview-v7:27.1.1'
compile 'com.mikepenz:materialize:1.0.0@aar'
compile 'com.jakewharton:butterknife:7.0.1'
testCompile 'junit:junit:4.12'
compile project(':windview')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.mikepenz:materialize:1.0.0@aar'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
testImplementation 'junit:junit:4.12'
implementation project(':windview')

}
20 changes: 10 additions & 10 deletions app/src/main/java/com/example/windview/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@
import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

public class MainActivity extends AppCompatActivity implements SeekBar.OnSeekBarChangeListener, RadioGroup.OnCheckedChangeListener, View.OnClickListener {
@Bind(R.id.windview)
@BindView(R.id.windview)
WindView windView;
@Bind(R.id.wind_speed)
@BindView(R.id.wind_speed)
SeekBar windSpeed;
@Bind(R.id.pressure)
@BindView(R.id.pressure)
SeekBar pressureSpeed;
@Bind(R.id.barometr_size)
@BindView(R.id.barometr_size)
SeekBar barometreSize;
@Bind(R.id.wind_unit)
@BindView(R.id.wind_unit)
AppCompatSpinner windUnit;
@Bind(R.id.radio_group)
@BindView(R.id.radio_group)
RadioGroup radioGroup;
@Bind(R.id.pressure_unit)
@BindView(R.id.pressure_unit)
AppCompatSpinner pressureUnit;
@Bind(R.id.animate)
@BindView(R.id.animate)
Button animateBaroMeter;
@Bind(R.id.linebar)
@BindView(R.id.linebar)
SeekBar line;


Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}

}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -19,6 +21,7 @@ buildscript {

allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
Expand Down
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 Dec 28 10:00:20 PST 2015
#Sat Aug 11 10:03:44 IRDT 2018
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.4-all.zip
10 changes: 5 additions & 5 deletions windview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.github.dcendents.android-maven'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'


defaultConfig {
minSdkVersion 14
Expand All @@ -24,12 +24,12 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.1.1'
testCompile 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.1.1'
testImplementation 'junit:junit:4.12'
}


Expand Down

0 comments on commit 1a5b67f

Please sign in to comment.