Commit 36d450ca authored by Giacomo Lavermicocca's avatar Giacomo Lavermicocca

short words to meet radio antenna update - fix notification android with a...

short words to meet radio antenna update - fix notification android with a better progress bar information pending requests
parent a7e495a5
......@@ -5,24 +5,22 @@
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="6">
<list size="5">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="5">
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
</list>
</value>
</option>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -22,13 +22,13 @@ android {
}
ext {
supportLibVersion = '27.0.0'
supportLibVersion = '27.1.1'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.android.support:support-emoji:$supportLibVersion"
......
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
package it.lavermicocca.giacomo.beautifulnotification
import android.util.Log
import it.lavermicocca.giacomo.beautifulnotification.mappers.Arguments
class HelperMessages{
......@@ -9,11 +10,11 @@ class HelperMessages{
fun Do(messaggio: String) : STATUS{
when(messaggio)
{
"L.C. : read : 37 1"-> {
"L.C. : r : 37 1"-> {
Log.e("TTAG", "UNO")
return STATUS.GARAGE_OPEN
}
"L.C. : read : 37 0"-> {
"L.C. : r : 37 0"-> {
Log.e("TTAG", "ZERO")
return STATUS.GARAGE_CLOSE
}
......@@ -22,7 +23,6 @@ class HelperMessages{
return STATUS.TIMEOUT
}
}
return STATUS.UNKNOWN
}
}
\ No newline at end of file
......@@ -45,7 +45,7 @@ class MainActivity : AppCompatActivity() {
//Helper.StartForegroundServiceNotification(applicationContext, "")
start_notification.setOnClickListener(View.OnClickListener {
Helper.StartForegroundServiceNotification(applicationContext, "a\nb\nc\nd\ne\nf\ng", Helper.FULL_ON)
Helper.StartForegroundServiceNotification(applicationContext, "...", Helper.FULL_ON)
})
findViewById<Button>(R.id.start_settings).setOnClickListener(View.OnClickListener {
......
......@@ -13,15 +13,10 @@ import java.io.IOException
class Sender(val context: Context) {
companion object {
val LAST_COMMAND_TIMEOUT = "LAST_COMMAND_TIMEOUT"
val LAST_COMMAND = "LAST_COMMAND"
val TIMEOUT = "TIMEOUT"
}
//NULL
fun SendRead(pin: Int) {
Helper.StartForegroundServiceNotification(context, "...", Helper.FULL_ON)
val prf = context.getSharedPreferences("myPref", Context.MODE_PRIVATE)
val ipServer = prf.getString("ip_server", "192.168.43.176")
val url = "http://$ipServer/read/$pin" // /pin$pin"
......@@ -37,6 +32,7 @@ class Sender(val context: Context) {
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
e.printStackTrace()
Helper.StartForegroundServiceNotification(context, e.localizedMessage, Helper.FULL_ON)
}
@Throws(IOException::class)
......@@ -59,6 +55,8 @@ class Sender(val context: Context) {
//UNO
fun SendPin(pin: Int) {
Helper.StartForegroundServiceNotification(context, "CANCELLO/GARAGE IN APERTURA...", Helper.FULL_ON)
val prf = context.getSharedPreferences("myPref", Context.MODE_PRIVATE)
val ipServer = prf.getString("ip_server", "192.168.43.176")
......@@ -72,9 +70,12 @@ class Sender(val context: Context) {
val client = OkHttpClient()
Helper.StartForegroundServiceNotification(context, "${Arguments.PIN} $pin", Helper.FULL_ON)
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
e.printStackTrace()
Helper.StartForegroundServiceNotification(context, e.localizedMessage, Helper.FULL_ON)
}
@Throws(IOException::class)
......@@ -98,9 +99,98 @@ class Sender(val context: Context) {
})
}
//UNO
fun SendPinPortone() {
Helper.StartForegroundServiceNotification(context, "PORTONE IN APERTURA...", Helper.FULL_ON)
val prf = context.getSharedPreferences("myPref", Context.MODE_PRIVATE)
val ipServer = prf.getString("ip_server_portone", "192.168.43.176")
val url = "http://$ipServer/on"
val request = okhttp3.Request.Builder()
.url(url)
.get()
//.addHeader("Content-Type", "application/json")
.build()
val client = OkHttpClient()
Helper.StartForegroundServiceNotification(context, "PORTONE", Helper.FULL_ON)
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
e.printStackTrace()
Helper.StartForegroundServiceNotification(context, e.localizedMessage, Helper.FULL_ON)
}
@Throws(IOException::class)
override fun onResponse(call: Call, response: Response) {
Helper.StartForegroundServiceNotification(context, "PORTONE APERTO", Helper.FULL_ON)
// val networkResp = response.body()!!.string()
// var looper = Looper.getMainLooper()
//
// Handler(looper).post(object :Runnable{
// override fun run() {
// //TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
// //Toast.makeText(context, networkResp, Toast.LENGTH_LONG).show()
//
// }
// })
}
})
}
//UNO
fun SendGPIO(pin: Int) {
Helper.StartForegroundServiceNotification(context, "PORTONE IN APERTURA...", Helper.FULL_ON)
val prf = context.getSharedPreferences("myPref", Context.MODE_PRIVATE)
val ipServer = prf.getString("ip_server", "192.168.43.176")
val url = "http://$ipServer/gpio/$pin"
val request = okhttp3.Request.Builder()
.url(url)
.get()
//.addHeader("Content-Type", "application/json")
.build()
val client = OkHttpClient()
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
e.printStackTrace()
Helper.StartForegroundServiceNotification(context, e.localizedMessage, Helper.FULL_ON)
}
@Throws(IOException::class)
override fun onResponse(call: Call, response: Response) {
val networkResp = response.body()!!.string()
var looper = Looper.getMainLooper()
Handler(looper).post(object :Runnable{
override fun run() {
//TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
Toast.makeText(context, networkResp, Toast.LENGTH_LONG).show()
if(networkResp.contains(Arguments.GPIO, true))
{
Log.e("TTAG", "RICHIESTA GPIO")
Helper.StartForegroundServiceNotification(context, "PORTONE OPEN", Helper.FULL_ON)
}
else {
Helper.StartForegroundServiceNotification(context, "ERRORE NEI MESSAGGI RADIO", Helper.FULL_ON)
}
}
})
}
})
}
//DUE
fun SendCheck(oneShot:Boolean) {
Thread.sleep(1000);
//Thread.sleep(1000);
val prf = context.getSharedPreferences("myPref", Context.MODE_PRIVATE)
val ipServer = prf.getString("ip_server", "192.168.43.176")
......@@ -126,13 +216,22 @@ class Sender(val context: Context) {
var status:HelperMessages.STATUS = HelperMessages().Do(networkResp)
if(status == HelperMessages.STATUS.TIMEOUT) {
Helper.StartForegroundServiceNotification(context, "ERRORE DI TIMEOUT", Helper.FULL_ON_STOP_PROGRESS)
}
else if(status == HelperMessages.STATUS.GARAGE_CLOSE) {
Helper.StartForegroundServiceNotification(context, "GARAGE OPEN", Helper.FULL_ON)
Helper.StartForegroundServiceNotification(context, "GARAGE OPEN", Helper.FULL_ON_STOP_PROGRESS)
}
else if(status == HelperMessages.STATUS.GARAGE_OPEN) {
Helper.StartForegroundServiceNotification(context, "GARAGE CLOSE", Helper.FULL_ON)
Helper.StartForegroundServiceNotification(context, "GARAGE CLOSE", Helper.FULL_ON_STOP_PROGRESS)
} else {
Helper.StartForegroundServiceNotification(context, networkResp, Helper.FULL_OFF)
// if(networkResp.contains("L.C. : p : "))
//
// else
// {
// Helper.StartForegroundServiceNotification(context, "ERRORE NEI MESSAGGI RADIO", Helper.FULL_ON_STOP_PROGRESS)
// return
// }
}
if(!oneShot)
......@@ -158,11 +257,11 @@ class Sender(val context: Context) {
override fun onTick(millisUntilFinished: Long) {
var t = "${testo} ${millisUntilFinished/1000}"
Helper.StartForegroundServiceNotification(context, t, Helper.FULL_OFF)
Helper.StartForegroundServiceNotification(context, t, Helper.FULL_ON)
}
override fun onFinish() {
Helper.StartForegroundServiceNotification(context, "Fine", Helper.FULL_ON);
Helper.StartForegroundServiceNotification(context, "Fine", Helper.FULL_ON_STOP_PROGRESS);
}
}.start()
}
......
......@@ -82,6 +82,7 @@ class SettingsActivity : AppCompatPreferenceActivity() {
// updated to reflect the new value, per the Android Design
// guidelines.
bindPreferenceSummaryToValue(findPreference("ip_server"))
bindPreferenceSummaryToValue(findPreference("ip_server_portone"))
bindPreferenceSummaryToValue(findPreference("timeout"))
}
......
......@@ -4,6 +4,7 @@ class Arguments{
companion object {
var READ = "read"
var PIN = "pin"
var GPIO = "gpio"
var CHECK = "check"
}
}
......@@ -36,8 +36,10 @@ class GenericNotificationClass(val service: Service, val text : String, val stat
fun startNotification() {
when (status){
Helper.FULL_ON -> fullOn()
Helper.FULL_ON -> fullOn(false)
Helper.FULL_ON_STOP_PROGRESS -> fullOn(true)
Helper.FULL_OFF -> fullOff()
Helper.FULL_OFF_ERROR -> fullOffError()
}
}
......@@ -54,29 +56,44 @@ class GenericNotificationClass(val service: Service, val text : String, val stat
notification.contentIntent = pendingNotificationIntent
notification.flags = notification.flags or Notification.FLAG_NO_CLEAR
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel(CHANNEL_ID, "Channel beauty notification", NotificationManager.IMPORTANCE_HIGH)
channel.lockscreenVisibility = Notification.VISIBILITY_SECRET
notificationManager.createNotificationChannel(channel)
}
//this is the intent that is supposed to be called when the
//button is clicked
service.startForeground(1, notification)
}
val switchIntent = Intent(service, SwitchButtonListener::class.java)
private fun fullOffError() {
val notificationView = RemoteViews(service.packageName, R.layout.mynotification_off_error)
prepareData(switchIntent, STATUS.lastCommand)
val lastCommand = PendingIntent.getBroadcast(service, 0, switchIntent, PendingIntent.FLAG_UPDATE_CURRENT)
notificationView.setTextViewText(R.id.text_response, text)
notificationView.setOnClickPendingIntent(R.id.last_command, lastCommand)
//the intent that is started when the notification is clicked (works)
val notificationIntent = Intent(service, MainActivity::class.java)
val pendingNotificationIntent = PendingIntent.getActivity(service, 0, notificationIntent, 0)
notification.contentView = notificationView
notification.contentIntent = pendingNotificationIntent
notification.flags = notification.flags or Notification.FLAG_NO_CLEAR
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel(CHANNEL_ID, "Channel human readable title", NotificationManager.IMPORTANCE_HIGH)
channel.lockscreenVisibility = Notification.VISIBILITY_PUBLIC
val channel = NotificationChannel(CHANNEL_ID, "Channel beauty notification", NotificationManager.IMPORTANCE_HIGH)
channel.lockscreenVisibility = Notification.VISIBILITY_SECRET
notificationManager.createNotificationChannel(channel)
}
service.startForeground(1, notification)
}
fun fullOn(){
fun fullOn(stopProgress: Boolean){
var notificationView = RemoteViews(service.packageName, R.layout.mynotification)
val notificationView = RemoteViews(service.packageName, R.layout.mynotification)
if(stopProgress) {
notificationView = RemoteViews(service.packageName, R.layout.mynotification_stop_progress)
}
notificationView.setTextViewText(R.id.text_response, text)
......@@ -88,7 +105,6 @@ class GenericNotificationClass(val service: Service, val text : String, val stat
notification.contentIntent = pendingNotificationIntent
notification.flags = notification.flags or Notification.FLAG_NO_CLEAR
//this is the intent that is supposed to be called when the
//button is clicked
......@@ -103,21 +119,17 @@ class GenericNotificationClass(val service: Service, val text : String, val stat
prepareData(switchIntent, STATUS.cancello)
val openCloseCancello = PendingIntent.getBroadcast(service, STATUS.cancello.ordinal, switchIntent, PendingIntent.FLAG_UPDATE_CURRENT)
prepareData(switchIntent, STATUS.all)
val all = PendingIntent.getBroadcast(service, STATUS.all.ordinal, switchIntent, PendingIntent.FLAG_UPDATE_CURRENT)
prepareData(switchIntent, STATUS.portone)
val openClosePortone = PendingIntent.getBroadcast(service, STATUS.portone.ordinal, switchIntent, PendingIntent.FLAG_UPDATE_CURRENT)
notificationView.setOnClickPendingIntent(R.id.last_command, lastCommand)
notificationView.setOnClickPendingIntent(R.id.open_close_garage, openCloseGarage)
notificationView.setOnClickPendingIntent(R.id.open_close_cancello, openCloseCancello)
notificationView.setOnClickPendingIntent(R.id.open_close_all, all)
notificationView.setOnClickPendingIntent(R.id.open_close_portone, openClosePortone)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel(CHANNEL_ID, "Channel human readable title", NotificationManager.IMPORTANCE_HIGH)
channel.lockscreenVisibility = Notification.VISIBILITY_PUBLIC
val channel = NotificationChannel(CHANNEL_ID, "Channel beauty notification", NotificationManager.IMPORTANCE_HIGH)
channel.lockscreenVisibility = Notification.VISIBILITY_SECRET
notificationManager.createNotificationChannel(channel)
}
......
......@@ -11,7 +11,7 @@ class SwitchButtonListener : BroadcastReceiver() {
var sender = Sender(context)
Log.d("Here", "I am here")
Log.d("TTAG", "SwitchButtonListener -> click button on notification trought BroadcastReceiver")
val requestCode = intent;
var status = GenericNotificationClass.STATUS.values()[
......@@ -19,9 +19,9 @@ class SwitchButtonListener : BroadcastReceiver() {
)]
when(status){
GenericNotificationClass.STATUS.lastCommand -> sender.SendCheck(true)
GenericNotificationClass.STATUS.lastCommand -> sender.SendRead(37)
GenericNotificationClass.STATUS.portone -> sender.SendRead(37)
GenericNotificationClass.STATUS.portone -> sender.SendPinPortone() //17 GPIO pin locale
GenericNotificationClass.STATUS.cancello -> sender.SendPin(17)
GenericNotificationClass.STATUS.garage -> sender.SendPin(21)
}
......
......@@ -3,7 +3,6 @@ package it.lavermicocca.giacomo.beautifulnotification.services
import android.content.Context
import android.content.Intent
import android.os.Build
import java.util.logging.SocketHandler
/**
* Created by giacomo on 12/05/18.
......@@ -15,7 +14,9 @@ object Helper {
val BUTTON_STATUS = "BUTTON_STATUS";
val FULL_OFF:Short = 0;
val FULL_OFF_ERROR:Short = -1;
val FULL_ON:Short = 255;
val FULL_ON_STOP_PROGRESS:Short = 254;
fun StartForegroundServiceNotification(context: Context, text: String, valore: Short) {
......
......@@ -13,12 +13,11 @@ import it.lavermicocca.giacomo.beautifulnotification.services.Helper.BUTTON_STAT
*/
class NotificationService : Service() {
override fun onBind(intent: Intent): IBinder? {
// TODO: Return the communication channel to the service.
throw UnsupportedOperationException("Not yet implemented")
override fun onBind(intent: Intent?): IBinder {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
var text = intent.getStringExtra(LAST_COMMAND);
......
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:layout_height="150dp"
android:background="@color/colorPrimary"
android:gravity="center"
android:orientation="horizontal"
android:orientation="vertical"
android:weightSum="100">
<RelativeLayout
android:id="@+id/layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/last_command"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Last C." />
android:layout_height="80dp"
android:text="\???" />
<Button
android:id="@+id/open_close_portone"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:text="PORTONE"
android:layout_toRightOf="@id/last_command"/>
<Button
android:id="@+id/open_close_garage"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:text="GARAGE"
android:layout_toRightOf="@id/open_close_portone"/>
<TextView
android:id="@+id/text_response"
<Button
android:id="@+id/open_close_cancello"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/last_command"
android:layout_alignEnd="@+id/last_command"
android:layout_alignRight="@+id/last_command"
android:gravity="center"
android:text="some text"
android:textAppearance="?android:attr/textAppearanceMedium" />
android:layout_height="80dp"
android:text="CANCELLO"
android:layout_toRightOf="@id/open_close_garage"/>
</RelativeLayout>
<Button
android:id="@+id/open_close_portone"
android:layout_width="wrap_content"
<ProgressBar
style="?android:attr/progressBarStyleHorizontal"
android:id="@+id/progress_bar"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="POR." />
android:indeterminateOnly="true" />
<Button
android:id="@+id/open_close_garage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GAR." />
<TextView
android:id="@+id/text_response"
<Button
android:id="@+id/open_close_cancello"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CAN." />
android:gravity="center"
android:text="ABCDEFGHILMNOPQRTU"
android:textAppearance="?android:attr/textAppearanceLargeInverse" />
<Button
android:id="@+id/open_close_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ALL" />
</LinearLayout>
\ No newline at end of file
......@@ -2,20 +2,15 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/holo_green_light"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="100" >
android:weightSum="100">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/last_command"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Last C." />
<TextView
android:id="@+id/text_response"
android:layout_width="wrap_content"
......
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/holo_red_light"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="100">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/text_response"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/last_command"
android:layout_alignEnd="@+id/last_command"
android:layout_alignRight="@+id/last_command"
android:gravity="center"
android:text="some text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="150dp"
android:background="@color/colorPrimary"
android:gravity="center"
android:orientation="vertical"
android:weightSum="100">
<RelativeLayout
android:id="@+id/layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/last_command"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:text="\???" />
<Button
android:id="@+id/open_close_portone"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:text="PORTONE"
android:layout_toRightOf="@id/last_command"/>
<Button
android:id="@+id/open_close_garage"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:text="GARAGE"
android:layout_toRightOf="@id/open_close_portone"/>
<Button
android:id="@+id/open_close_cancello"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:text="CANCELLO"
android:layout_toRightOf="@id/open_close_garage"/>
</RelativeLayout>
<TextView
android:id="@+id/text_response"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="ABCDEFGHILMNOPQRTU"
android:textAppearance="?android:attr/textAppearanceLargeInverse" />
</LinearLayout>
\ No newline at end of file
......@@ -23,6 +23,16 @@
android:singleLine="true"
android:title="Timeout next command radio" />
<EditTextPreference
android:capitalize="none"
android:defaultValue="192.168.5.6"
android:inputType="text"
android:key="ip_server_portone"
android:maxLines="1"
android:selectAllOnFocus="true"
android:singleLine="true"
android:title="ip server portone" />
<!-- NOTE: Hide buttons to simplify the UI. Users can touch outside the dialog to
dismiss it. -->
<!-- NOTE: ListPreference's summary should be set to its value by the activity code. -->
......
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.41'
ext.kotlin_version = '1.2.51'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-beta01'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment