Skip to content
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
76 changes: 32 additions & 44 deletions RingPublishingGDPR/build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
apply plugin: 'com.android.library'
apply from: file('publish.gradle')

android
{
android {
namespace 'com.ringpublishing.gdpr'
compileSdk APP_COMPILE_SDK_VERSION

compileOptions
{
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

defaultConfig
{
defaultConfig {
minSdkVersion APP_MIN_SDK_VERSION
targetSdkVersion APP_TARGET_SDK_VERSION


multiDexEnabled true

buildConfigField "String", "CMP_HOST", "\"cmp.ringpublishing.com\""
buildConfigField "String", "CMP_JSON_CONFIGURATION_FIELD_HOST", "\"webview_url\""
buildConfigField "String", "CMP_JSON_CONFIGURATION_FIELD_GDPR_APPLIES", "\"gdpr_applies\""
Expand All @@ -36,20 +30,16 @@ android
testApplicationId "com.ringpublishing.gdpr.test"
}

buildTypes
{
release
{
buildTypes {
release {
minifyEnabled false
}
tst
{
tst {
testCoverageEnabled = true
}
}

buildFeatures
{
buildFeatures {
buildConfig = true
}

Expand All @@ -61,8 +51,7 @@ android
useLibrary 'android.test.base'
useLibrary 'android.test.mock'

testOptions
{
testOptions {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
unitTests.all {
Expand All @@ -78,47 +67,46 @@ android

}

dependencies
{
api "androidx.annotation:annotation:1.7.1"
api "com.google.android.material:material:1.11.0"
api 'androidx.preference:preference:1.2.1'
api 'androidx.appcompat:appcompat:1.6.1'
dependencies {
api libs.annotation
api libs.material
api libs.preference
api libs.appcompat

api "com.squareup.okhttp3:okhttp:4.12.0"
api "com.squareup.retrofit2:retrofit:2.9.0"
api "com.squareup.retrofit2:converter-moshi:2.9.0"
api "com.squareup.retrofit2:converter-gson:2.9.0"
api libs.okhttp3
api libs.retrofit
api libs.retrofit.moshi
api libs.retrofit.gson

// Fix for missing conscrypt hostname verifier in logs
api 'org.conscrypt:conscrypt-android:2.5.2'
api libs.conscrypt.android

// Core library

testImplementation "junit:junit:4.13.2"
testImplementation 'androidx.test:core:1.5.0'
testImplementation libs.junit
testImplementation libs.test.core

// AndroidJUnitRunner and JUnit Rules
testImplementation 'androidx.test:runner:1.5.2'
testImplementation 'androidx.test:rules:1.5.0'
testImplementation libs.test.runner
testImplementation libs.test.rules

// Assertions
testImplementation 'androidx.test.ext:junit:1.1.5'
testImplementation 'androidx.test.ext:truth:1.5.0'
testImplementation 'com.google.truth:truth:1.0'
testImplementation libs.junit.ext
testImplementation libs.test.truth.ext
testImplementation libs.truth

testImplementation 'org.json:json:20220320'
testImplementation libs.json

// Core library
androidTestImplementation 'androidx.test:core:1.5.0'
androidTestImplementation libs.test.core

// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation libs.test.runner
androidTestImplementation libs.test.rules

// Assertions
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.ext:truth:1.5.0'
androidTestImplementation 'com.google.truth:truth:1.0'
androidTestImplementation libs.junit.ext
androidTestImplementation libs.test.truth.ext
androidTestImplementation libs.truth
}

27 changes: 0 additions & 27 deletions bamboo.gradle

This file was deleted.

27 changes: 12 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
buildscript
{
repositories
{
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}

dependencies
{
classpath "com.android.tools.build:gradle:8.6.0"
classpath "com.github.ben-manes:gradle-versions-plugin:0.43.0"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.24.18"
dependencies {
classpath libs.classpath.gradle.tools
classpath libs.classpath.gradle.versions
classpath libs.classpath.jfrog.info

classpath libs.classpath.kotlin
}
}

allprojects
{
repositories
{
allprojects {
repositories {
mavenCentral()
google()

Expand All @@ -36,9 +34,8 @@ tasks.register('clean', Delete) {
delete rootProject.buildDir
}

project.ext {
ext {
APP_MIN_SDK_VERSION = 24
APP_COMPILE_SDK_VERSION = 35
APP_TARGET_SDK_VERSION = 35
APP_BUILD_TOOLS_VERSION = '35.0.0'
}
12 changes: 5 additions & 7 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.application'
apply from: '../bamboo.gradle'
android
{
namespace 'com.ringpublishing.gdpr.demo'
Expand Down Expand Up @@ -84,12 +83,11 @@ dependencies
//Then comment 'implementation project(path: ':RingPublishingGDPR')' and uncomment:
//implementation("com.ringpublishing:gdpr:1.5.3")

implementation "androidx.multidex:multidex:2.0.1"
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2'
implementation libs.lifecycle.livedata
implementation libs.lifecycle.viewmodel

implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
implementation(platform(libs.kotlin.bom))

debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'
debugImplementation 'com.squareup.curtains:curtains:1.2.4'
debugImplementation libs.leakcanary.android
debugImplementation libs.curtains
}
4 changes: 0 additions & 4 deletions demo/fabric.properties

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
package com.ringpublishing.gdpr.demo;

import android.app.Application;
import android.graphics.Color;
import android.graphics.Typeface;
import android.text.TextUtils;
import android.util.Log;
import android.webkit.WebView;
import android.widget.Toast;

import androidx.multidex.MultiDexApplication;

import com.ringpublishing.gdpr.BuildConfig;
import com.ringpublishing.gdpr.LogListener;
import com.ringpublishing.gdpr.RingPublishingGDPR;
import com.ringpublishing.gdpr.RingPublishingGDPRError;
import com.ringpublishing.gdpr.RingPublishingGDPRListener;
import com.ringpublishing.gdpr.RingPublishingGDPRUIConfig;

public class DemoApplication extends MultiDexApplication {
public class DemoApplication extends Application {

private final RingPublishingGDPR ringPublishingGDPR = RingPublishingGDPR.getInstance();

Expand Down
58 changes: 58 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[versions]
conscrypt-android = "2.5.2"
curtains = "1.2.4"
json = "20220320"
junit-ext = "1.1.5"
kotlin = "2.0.21"
annotation = "1.7.0"
appcompat = "1.7.1"
material = "1.12.0"
preference = "1.2.1"
lifecycle = "2.6.+"
okhttp3 = "4.12.0"
retrofit = "2.12.0"
test-rules = "1.5.0"
test-runner = "1.5.2"
test-truth = "1.5.0"
truth = "1.1.3"
junit = "4.13.2"
test-core = "1.6.1"
leakcanary-android = "2.+"

gradle-tools = "8.6.1"
gradle-versions = "0.52.+"
gradle-jfrog-info = "5.2.+"

[libraries]
annotation = { group = "androidx.annotation", name = "annotation", version.ref = "annotation" }
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
curtains = { module = "com.squareup.curtains:curtains", version.ref = "curtains" }
lifecycle-livedata = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycle" }
lifecycle-viewmodel = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
preference = { group = "androidx.preference", name = "preference-ktx", version.ref = "preference" }

conscrypt-android = { group = "org.conscrypt", name = "conscrypt-android", version.ref = "conscrypt-android" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
kotlin-bom = { group = "org.jetbrains.kotlin", name = "kotlin-bom", version.ref = "kotlin" }
leakcanary-android = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "leakcanary-android" }
retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" }
retrofit-gson = { group = "com.squareup.retrofit2", name = "converter-gson", version.ref = "retrofit" }
retrofit-moshi = { group = "com.squareup.retrofit2", name = "converter-moshi", version.ref = "retrofit" }
okhttp3 = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp3" }

# Test
test-core = { group = "androidx.test", name = "core", version.ref = "test-core" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
test-runner = { group = "androidx.test", name = "runner", version.ref = "test-runner" }
test-rules = { group = "androidx.test", name = "rules", version.ref = "test-rules" }
junit-ext = { group = "androidx.test.ext", name = "junit", version.ref = "junit-ext" }
json = { group = "org.json", name = "json", version.ref = "json" }
truth = { group = "com.google.truth", name = "truth", version.ref = "truth" }
test-truth-ext = { group = "androidx.test.ext", name = "truth", version.ref = "test-truth" }


# Classpath
classpath-gradle-tools = { group = "com.android.tools.build", name = "gradle", version.ref = "gradle-tools" }
classpath-gradle-versions = { group = "com.github.ben-manes", name = "gradle-versions-plugin", version.ref = "gradle-versions" }
classpath-jfrog-info = { group = "org.jfrog.buildinfo", name = "build-info-extractor-gradle", version.ref = "gradle-jfrog-info" }
classpath-kotlin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists