Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

[WIP] Library updates, to fix breaking changes. #64

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
35 changes: 20 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

buildscript {
repositories {
jcenter()
mavenCentral()
}
}

android {
compileSdkVersion 28
compileSdkVersion 31
buildToolsVersion '28.0.3'

defaultConfig {
applicationId "com.mutualmobile.barricade.sample"
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -41,34 +41,36 @@ android {


dependencies {
implementation "androidx.appcompat:appcompat:${SUPPORT_LIB_VERSION}"
implementation "androidx.cardview:cardview:${SUPPORT_LIB_VERSION}"
implementation "androidx.appcompat:appcompat:1.4.0-rc01"
implementation "androidx.cardview:cardview:1.0.0"

implementation project(':barricade')
annotationProcessor project(':barricade-compiler')

implementation "com.squareup.okhttp3:logging-interceptor:${OKHTTP_VERSION}"
implementation "com.squareup.okhttp3:logging-interceptor:4.9.0"

implementation "com.squareup.retrofit2:retrofit:${RETROFIT_VERSION}"
implementation "com.squareup.retrofit2:converter-gson:${RETROFIT_VERSION}"
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"

testImplementation 'junit:junit:4.12'
testImplementation 'com.google.truth:truth:0.35'
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.google.truth:truth:0.43'

androidTestImplementation "androidx.test.espresso:espresso-core:${ESPRESSO_VERSION}"
androidTestImplementation "androidx.test:runner:${RUNNER_VERSION}"
androidTestImplementation "androidx.annotation:annotation:${SUPPORT_LIB_VERSION}"
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.0-alpha03"
androidTestImplementation "androidx.test:runner:1.4.1-alpha03"
androidTestImplementation "androidx.annotation:annotation:1.3.0"

androidTestImplementation 'com.jakewharton.espresso:okhttp3-idling-resource:1.0.0'
androidTestImplementation "com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}"
androidTestImplementation('androidx.test.espresso:espresso-contrib:3.1.0-alpha4') {
androidTestImplementation "com.squareup.okhttp3:okhttp:5.0.0-alpha2"
androidTestImplementation('androidx.test.espresso:espresso-contrib:3.5.0-alpha03') {
// Necessary to avoid version conflicts
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
implementation project(path: ':barricade-annotations')
implementation "androidx.core:core-ktx:1.7.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}


Expand All @@ -80,3 +82,6 @@ configurations.all {
cacheChangingModulesFor 0, 'seconds'
}
}
repositories {
mavenCentral()
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@
import com.mutualmobile.barricade.sample.api.model.Joke;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;

public interface ChuckNorrisApiService {

@GET("/jokes/random") @Barricade(endpoint = "random", responses = {
@Response(fileName = "success.json",isDefault = true),
@Response(fileName = "failure.json", statusCode = 401)
}) Call<Joke> getRandomJoke();
@GET("/jokes/random")
@Barricade(endpoint = "random", responses = {
@Response(fileName = "success.json", isDefault = true),
@Response(fileName = "failure.json", statusCode = 401)
})
Call<Joke> getRandomJoke();

@GET("/jokes/categories") Call<List<String>> getJokeCategories();
@GET("/jokes/categories")
Call<List<String>> getJokeCategories();
}
4 changes: 3 additions & 1 deletion barricade-compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ ext {

dependencies {
implementation 'com.google.auto.service:auto-service:1.0-rc2'
implementation 'com.squareup:javapoet:1.10.0'
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc2'

implementation 'com.squareup:javapoet:1.13.0'

implementation project(':barricade-annotations')
}
Expand Down
28 changes: 16 additions & 12 deletions barricade/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

sourceCompatibility = 1.7
targetCompatibility = 1.7

android {
compileSdkVersion 28
compileSdkVersion 31
buildToolsVersion '28.0.3'

defaultConfig {
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName VERSION_NAME
targetSdkVersion 31
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -37,15 +36,20 @@ ext {
dependencies {
implementation project(':barricade-annotations')

implementation "androidx.appcompat:appcompat:${SUPPORT_LIB_VERSION}"
implementation "androidx.legacy:legacy-support-v4:${SUPPORT_LIB_VERSION}"
implementation "androidx.recyclerview:recyclerview:${SUPPORT_LIB_VERSION}"
implementation "androidx.appcompat:appcompat:1.3.1"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "androidx.recyclerview:recyclerview:1.2.1"

implementation "com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}"
implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.2"

androidTestImplementation "androidx.test.espresso:espresso-core:${ESPRESSO_VERSION}"
androidTestImplementation "androidx.test:runner:${RUNNER_VERSION}"
androidTestImplementation "androidx.annotation:annotation:${SUPPORT_LIB_VERSION}"
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.0-alpha03"
androidTestImplementation "androidx.test:runner:1.4.1-alpha03"
androidTestImplementation "androidx.annotation:annotation:"
implementation "androidx.core:core-ktx:1.7.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

apply from: '../bintray.gradle'
apply from: '../bintray.gradle'
repositories {
mavenCentral()
}
111 changes: 42 additions & 69 deletions bintray.gradle
Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'

group = GROUP // Maven Group ID for the artifact
afterEvaluate {
publishing {
publications {
mavenJava(MavenPublication) {
groupId = GROUP
artifactId = 'barricade'
version = VERSION_NAME
pom {
packaging 'aar'
groupId GROUP
artifactId bintrayName

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
groupId GROUP
artifactId bintrayName
// Add your description here
name = libraryName
description POM_DESCRIPTION
url = POM_SITE_URL

// Add your description here
name libraryName
description POM_DESCRIPTION
url POM_SITE_URL

// Set your license
licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
// Set your license
licenses {
license {
name = POM_LICENCE_NAME
url = POM_LICENCE_URL
}
}
}
developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
email POM_DEVELOPER_EMAIL
developers {
developer {
id = POM_DEVELOPER_ID
name = POM_DEVELOPER_NAME
email = POM_DEVELOPER_EMAIL
}
}
scm {
connection = POM_GIT_URL
developerConnection = POM_GIT_URL
url = POM_SITE_URL
}
}
scm {
connection POM_GIT_URL
developerConnection POM_GIT_URL
url POM_SITE_URL
}

}
}
repositories {
maven {
url "$buildDir/releases"
}
}
}
}

apply plugin: 'com.jfrog.bintray'

version = VERSION_NAME

if (project.hasProperty("android")) {
// Android libraries
task sourcesJar(type: Jar) {
classifier = 'sources'
classifier("sources")
from android.sourceSets.main.java.srcDirs
}

Expand All @@ -58,13 +62,13 @@ if (project.hasProperty("android")) {
} else {
// Java libraries
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
classifier("sources")
from sourceSets.main.allSource
}
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
classifier("javadoc")
from javadoc.destinationDir
}

Expand All @@ -73,34 +77,3 @@ artifacts {
archives sourcesJar
}

// Bintray
Properties properties = new Properties()
if (project.rootProject.file('local.properties').exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives']
pkg {
repo = POM_REPO
name = bintrayName
desc = POM_DESCRIPTION
websiteUrl = POM_SITE_URL
userOrg = POM_ORG
vcsUrl = POM_GIT_URL
licenses = POM_LICENCES
publish = true
publicDownloadNumbers = true
version {
desc = POM_DESCRIPTION
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = properties.getProperty("bintray.gpg.password")
//Optional. The passphrase for GPG signing'
}
}
}
}
42 changes: 18 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
ext.kotlin_version = '1.5.31'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
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()
}
repositories {
google()
jcenter()

}
}

task clean(type: Delete) {
delete rootProject.buildDir
delete rootProject.buildDir
}

ext {
OKHTTP_VERSION = "3.8.0"
SUPPORT_LIB_VERSION = '1.0.0-beta01'
RETROFIT_VERSION = "2.4.0"
ESPRESSO_VERSION = '3.1.0-alpha4'
RUNNER_VERSION = '1.1.0-alpha4'
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Jan 02 13:42:50 IST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
Loading