move jcenter to mavencentral, inline some dependencies, restrict jcenter to those we can be certain to update

This commit is contained in:
AdrianLxM 2021-02-10 23:33:32 +01:00
parent 95e87af68b
commit 5acdac3dc8
13 changed files with 30 additions and 59 deletions

View file

@ -1,6 +1,5 @@
buildscript { buildscript {
repositories { repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" } // jacoco 0.2 maven { url "https://plugins.gradle.org/m2/" } // jacoco 0.2
} }
@ -22,7 +21,6 @@ jacoco {
} }
repositories { repositories {
jcenter { url "https://jcenter.bintray.com/" }
mavenCentral() mavenCentral()
google() google()
} }
@ -245,6 +243,9 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
// https://github.com/DavidProdinger/Weekdays-Selector (used outdated 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1')
implementation(name: 'weekdaysselector-1.1.1', ext: 'aar')
testImplementation "junit:junit:$junit_version" testImplementation "junit:junit:$junit_version"
testImplementation 'org.json:json:20201115' testImplementation 'org.json:json:20201115'
testImplementation "org.mockito:mockito-core:${mockitoVersion}" testImplementation "org.mockito:mockito-core:${mockitoVersion}"

Binary file not shown.

Binary file not shown.

View file

@ -7,7 +7,7 @@
android:pathData="M60.558,17.9c-0,-7.782 -6.318,-14.1 -14.1,-14.1l-29.149,-0c-7.782,-0 -14.1,6.318 -14.1,14.1l0,28.2c0,7.782 6.318,14.1 14.1,14.1l29.149,0c7.782,0 14.1,-6.318 14.1,-14.1l-0,-28.2Z" android:pathData="M60.558,17.9c-0,-7.782 -6.318,-14.1 -14.1,-14.1l-29.149,-0c-7.782,-0 -14.1,6.318 -14.1,14.1l0,28.2c0,7.782 6.318,14.1 14.1,14.1l29.149,0c7.782,0 14.1,-6.318 14.1,-14.1l-0,-28.2Z"
android:strokeAlpha="0.96" android:strokeAlpha="0.96"
android:strokeWidth="0.84" android:strokeWidth="0.84"
android:fillColor="?attr/text_color" android:fillColor="@android:color/transparent"
android:strokeColor="#fff"/> android:strokeColor="#fff"/>
<path <path
android:pathData="M11.708,14.729l0,-1.224l3.819,-0.008l-0,3.874c-0.586,0.541 -1.191,0.948 -1.814,1.221c-0.623,0.273 -1.263,0.41 -1.919,0.41c-0.885,-0 -1.69,-0.22 -2.413,-0.659c-0.724,-0.439 -1.27,-1.074 -1.639,-1.905c-0.369,-0.83 -0.553,-1.759 -0.553,-2.784c-0,-1.016 0.183,-1.964 0.55,-2.845c0.367,-0.88 0.895,-1.534 1.584,-1.961c0.688,-0.428 1.481,-0.641 2.379,-0.641c0.652,-0 1.241,0.122 1.768,0.366c0.527,0.245 0.94,0.586 1.239,1.022c0.299,0.437 0.527,1.007 0.682,1.709l-1.076,0.342c-0.135,-0.532 -0.303,-0.949 -0.504,-1.253c-0.201,-0.304 -0.488,-0.547 -0.861,-0.73c-0.373,-0.183 -0.787,-0.274 -1.242,-0.274c-0.545,-0 -1.016,0.096 -1.414,0.288c-0.398,0.192 -0.718,0.445 -0.962,0.759c-0.244,0.313 -0.434,0.657 -0.569,1.032c-0.23,0.646 -0.344,1.346 -0.344,2.101c-0,0.93 0.138,1.709 0.415,2.335c0.276,0.627 0.679,1.092 1.208,1.396c0.529,0.304 1.09,0.456 1.685,0.456c0.516,-0 1.02,-0.115 1.512,-0.346c0.492,-0.23 0.865,-0.476 1.119,-0.737l0,-1.944l-2.65,0Z" android:pathData="M11.708,14.729l0,-1.224l3.819,-0.008l-0,3.874c-0.586,0.541 -1.191,0.948 -1.814,1.221c-0.623,0.273 -1.263,0.41 -1.919,0.41c-0.885,-0 -1.69,-0.22 -2.413,-0.659c-0.724,-0.439 -1.27,-1.074 -1.639,-1.905c-0.369,-0.83 -0.553,-1.759 -0.553,-2.784c-0,-1.016 0.183,-1.964 0.55,-2.845c0.367,-0.88 0.895,-1.534 1.584,-1.961c0.688,-0.428 1.481,-0.641 2.379,-0.641c0.652,-0 1.241,0.122 1.768,0.366c0.527,0.245 0.94,0.586 1.239,1.022c0.299,0.437 0.527,1.007 0.682,1.709l-1.076,0.342c-0.135,-0.532 -0.303,-0.949 -0.504,-1.253c-0.201,-0.304 -0.488,-0.547 -0.861,-0.73c-0.373,-0.183 -0.787,-0.274 -1.242,-0.274c-0.545,-0 -1.016,0.096 -1.414,0.288c-0.398,0.192 -0.718,0.445 -0.962,0.759c-0.244,0.313 -0.434,0.657 -0.569,1.032c-0.23,0.646 -0.344,1.346 -0.344,2.101c-0,0.93 0.138,1.709 0.415,2.335c0.276,0.627 0.679,1.092 1.208,1.396c0.529,0.304 1.09,0.456 1.685,0.456c0.516,-0 1.02,-0.115 1.512,-0.346c0.492,-0.23 0.865,-0.476 1.119,-0.737l0,-1.944l-2.65,0Z"

View file

@ -34,7 +34,12 @@ buildscript {
} }
repositories { repositories {
google() google()
jcenter() mavenCentral()
jcenter() {
content {
includeModule("org.jetbrains.trove4j", "trove4j")
}
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.0.1' classpath 'com.android.tools.build:gradle:4.0.1'
@ -51,8 +56,7 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
maven { maven {
url "https://maven.google.com" url "https://maven.google.com"
} }
@ -63,6 +67,12 @@ allprojects {
} }
} }
maven { url 'https://jitpack.io' } maven { url 'https://jitpack.io' }
jcenter() {
content {
includeModule("com.google.android", "flexbox")
includeModule("org.jetbrains.trove4j", "trove4j")
}
}
} }
//Support @JvmDefault //Support @JvmDefault
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {

View file

@ -109,8 +109,6 @@ dependencies {
api 'org.mozilla:rhino:1.7.13' api 'org.mozilla:rhino:1.7.13'
api 'com.github.DavidProdinger:weekdays-selector:1.1.0'
api 'com.github.kenglxn.QRGen:android:2.6.0' api 'com.github.kenglxn.QRGen:android:2.6.0'
api 'com.eatthepath:java-otp:0.2.0' api 'com.eatthepath:java-otp:0.2.0'

View file

@ -1,25 +0,0 @@
package info.nightscout.database
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("info.nightscout.database.test", appContext.packageName)
}
}

View file

@ -1,18 +0,0 @@
package info.nightscout.database
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}

View file

@ -1,6 +1,6 @@
#Tue Oct 20 18:24:46 CEST 2020 #Wed Feb 10 19:21:54 CET 2021
distributionBase=GRADLE_USER_HOME 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-6.1.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

View file

@ -28,6 +28,8 @@ import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsOmnipodManager; import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsOmnipodManager;
import info.nightscout.androidaps.utils.resources.ResourceHelper; import info.nightscout.androidaps.utils.resources.ResourceHelper;
import info.nightscout.androidaps.utils.rx.AapsSchedulers;
import info.nightscout.androidaps.utils.rx.TestAapsSchedulers;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any;
@ -41,7 +43,7 @@ public class OmnipodPumpPluginTest {
@Mock HasAndroidInjector injector; @Mock HasAndroidInjector injector;
AAPSLogger aapsLogger = new AAPSLoggerTest(); AAPSLogger aapsLogger = new AAPSLoggerTest();
RxBusWrapper rxBusWrapper = new RxBusWrapper(); RxBusWrapper rxBusWrapper = new RxBusWrapper(new TestAapsSchedulers());
@Mock ResourceHelper resourceHelper; @Mock ResourceHelper resourceHelper;
@Mock(answer = Answers.RETURNS_DEEP_STUBS) ActivePluginProvider activePluginProvider; @Mock(answer = Answers.RETURNS_DEEP_STUBS) ActivePluginProvider activePluginProvider;
@Mock AapsOmnipodManager aapsOmnipodManager; @Mock AapsOmnipodManager aapsOmnipodManager;
@ -57,7 +59,7 @@ public class OmnipodPumpPluginTest {
// mock all the things // mock all the things
PowerMockito.mockStatic(Looper.class); PowerMockito.mockStatic(Looper.class);
OmnipodPumpPlugin plugin = new OmnipodPumpPlugin(injector, aapsLogger, rxBusWrapper, null, OmnipodPumpPlugin plugin = new OmnipodPumpPlugin(injector, aapsLogger, new TestAapsSchedulers(), rxBusWrapper, null,
resourceHelper, activePluginProvider, null, null, aapsOmnipodManager, commandQueueProvider, resourceHelper, activePluginProvider, null, null, aapsOmnipodManager, commandQueueProvider,
null, null, null, null, null, null, null, null,
rileyLinkUtil, null, null, null, null rileyLinkUtil, null, null, null, null

View file

@ -14,6 +14,7 @@ import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.plugins.bus.RxBusWrapper; import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.FirmwareVersion; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.FirmwareVersion;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus;
import info.nightscout.androidaps.utils.rx.TestAapsSchedulers;
import info.nightscout.androidaps.utils.sharedPreferences.SP; import info.nightscout.androidaps.utils.sharedPreferences.SP;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@ -23,7 +24,7 @@ public class AapsPodStateManagerTest {
@Mock AAPSLogger aapsLogger; @Mock AAPSLogger aapsLogger;
@Mock SP sp; @Mock SP sp;
private RxBusWrapper rxBus = new RxBusWrapper(); private RxBusWrapper rxBus = new RxBusWrapper(new TestAapsSchedulers());
@Test @Test
public void times() { public void times() {

View file

@ -1,6 +1,7 @@
buildscript { buildscript {
repositories { repositories {
jcenter() google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" } // jacoco 0.2 maven { url "https://plugins.gradle.org/m2/" } // jacoco 0.2
} }
@ -99,7 +100,8 @@ android {
allprojects { allprojects {
repositories { repositories {
jcenter() google()
mavenCentral()
flatDir { flatDir {
dirs 'libs' dirs 'libs'
} }
@ -119,10 +121,10 @@ dependencies {
implementation "com.google.android.support:wearable:${wearableVersion}" implementation "com.google.android.support:wearable:${wearableVersion}"
implementation "com.google.android.gms:play-services-wearable:${playServicesWearable}" implementation "com.google.android.gms:play-services-wearable:${playServicesWearable}"
implementation(name: 'ustwo-clockwise-debug', ext: 'aar') implementation(name: 'ustwo-clockwise-debug', ext: 'aar')
implementation(name: 'wearpreferenceactivity-0.5.0', ext: 'aar')
implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.percentlayout:percentlayout:1.0.0' implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'androidx.wear:wear:1.1.0' implementation 'androidx.wear:wear:1.1.0'
implementation('me.denley.wearpreferenceactivity:wearpreferenceactivity:0.5.0')
implementation('com.github.lecho:hellocharts-library:1.5.8@aar') implementation('com.github.lecho:hellocharts-library:1.5.8@aar')
testImplementation "junit:junit:$junit_version" testImplementation "junit:junit:$junit_version"

Binary file not shown.