Skip to content

Commit

Permalink
Finish 4.1.0-alpha2
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealAgentK committed Nov 19, 2023
2 parents 3013caa + f6423f7 commit 3084271
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog

- v4.1.0-alpha2:
- Gradle 8, AGP 8.1.1
- Fix: Sample app displayed wrong provider version
- Internal: Introduced gitflow process

- v4.1.0-alpha1:
- Upgrade repo and all dependencies to SDK 34, Android X (#83) and others.
- Documented Timber linting behaviour and solution (#69).
Expand Down
17 changes: 8 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

## Project and library organisation

Building the project at this stage requires Android Studio 3.2+ and Java 8 or newer.
Building the project requires Android Studio 2022.3.1 and Gradle 8.

The project consists of two modules:

/app: A sample app demonstrating the use of Raygun4Android with a dependency to the "provider" module of the project.
`:app`: A sample app demonstrating the use of Raygun4Android with a dependency to the `:provider` module of the project.

/provider: Android library project that contains the actual Raygun4Android provider.
`:provider`: Android library project that contains the actual Raygun4Android provider.

## Building

### Building from Android Studio

Setup the app or provider module in Run - Edit Configurations. Select the module in the UI and build by pressing the green triangle button next to it.
Setup the `:app` or `:provider` module in Run - Edit Configurations. Select the module in the UI and build by pressing the green triangle button next to it.

Building the app module will also resolve the dependency to the provider module.
Building the `:app` module will also resolve the dependency to the `:provider` module.

build.gradle in the app module defines which version of the library is being used (replace `<version>` with the library version you'd like to use):
`build.gradle` in the `"app` module defines which version of the library is being used (replace `<version>` with the library version you'd like to use):

````
// Build from local provider library src
Expand All @@ -45,13 +45,12 @@ chmod u+x gradlew
To generate the library locally run in the terminal:

````
./gradlew clean :provider:assembleDebug
./gradlew clean :provider:assembleRelease
./gradlew clean :provider:build
````

## How to contribute?
Please fork the main repository from https://github.com/MindscapeHQ/raygun4android into your own GitHub account.

Create a local dev branch (named so that it explains the work in the branch), and submit a pull request against the main repository. Even better, get in touch with us here on Github before you undertake any work so that it can be coordinated with what we're doing.
Create a local branch off `develop` in your fork, named so that it explains the work in the branch, and submit a pull request against the main repositories' `develop` branch. Even better, get in touch with us here on Github before you undertake any work so that it can be coordinated with what we're doing.

If you're interested in contributing on a regular basis, please get in touch with the Raygun team.
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ Supports Android 4.1+ (API 16+).

## IMPORTANT

### 16 June 2020
### 10 November 2023

Raygun4Android 4.0.1 is currently considered to be the stable release of the provider and is tagged in the repository.

The master branch reflect ongoing work on the 4.1 line as snapshots.
The `develop` branch reflects ongoing work on the 4.1 line as tagged snapshots.

The `master` branch used to be the branch for ongoing work and releases until `4.1.0-alpha1`. In the future, the `master` branch will reflect release builds.

Raygun4Android is currently actively being worked on towards a release of version 5 in the near future.

Expand Down Expand Up @@ -391,17 +393,6 @@ Provides an instance of a class which has an onBeforeSend method that can be use
Raygun4Android uses Timber for internal logging. This requires some language features that are only available with Java 8. Make sure that your project, using the library, has set the compilation compatibility to Java 8 as the minimum.

Google's documentation has more information on the reasons and implications of this requirement: https://developer.android.com/studio/write/java8-support

```groovy
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
...
}
```

* There's something weird going on - I checked the logs and the Raygun servers can't be reached!

Expand Down
17 changes: 12 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def createRaygunProguardTask(token,raygunAppPath,groupName,version) {
}
}


android {

signingConfigs {
releaseConfig {
keyAlias 'testkey'
Expand All @@ -75,18 +75,22 @@ android {
storePassword '123456'
}
}

compileSdk 34

defaultConfig {
applicationId "com.raygun.raygun4android"
minSdkVersion 16
targetSdkVersion 34
versionCode = Long.valueOf(VERSION_CODE)
versionName = "${VERSION_NAME}-sample"
buildConfigField("long", "VERSION_CODE", VERSION_CODE)
buildConfigField("String","VERSION_NAME","\"${VERSION_NAME}-sample\"")
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

lintOptions {
disable 'LogNotTimber','StringFormatInTimber', 'ThrowableNotAtBeginning', 'BinaryOperationInTimber', 'TimberArgCount', 'TimberArgTypes', 'TimberTagLength'
}

buildTypes {
release {
debuggable false
Expand All @@ -101,13 +105,16 @@ android {
versionNameSuffix '-DEBUG'
}
}

buildFeatures {
viewBinding true
}

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

// Setup RG tasks
createRaygunNotifyDeploymentTask(RAYGUN_API_TOKEN, RAYGUN_API_KEY, RAYGUN_GROUP, defaultConfig.versionName, localUserName, localUserEmail)
createRaygunProguardTask(RAYGUN_API_TOKEN, RAYGUN_APP_PATH, RAYGUN_GROUP, defaultConfig.versionName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ class MainActivity : AppCompatActivity() {
startActivity(SecondActivity.getIntent(this@MainActivity))
}


textViewAppVersion.text = getString(R.string.app_version_text, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE, BuildConfig.BUILD_TYPE)
textViewProviderVersion.text = getString(R.string.provider_version_text, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE, BuildConfig.BUILD_TYPE)
textViewProviderVersion.text = getString(R.string.provider_version_text, com.raygun.raygun4android.BuildConfig.VERSION_NAME, com.raygun.raygun4android.BuildConfig.VERSION_CODE, com.raygun.raygun4android.BuildConfig.BUILD_TYPE)

RaygunClient.recordBreadcrumb("I'm here in Main Activity")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class SecondActivity : AppCompatActivity() {
}

textViewAppVersion.text = getString(R.string.app_version_text, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE, BuildConfig.BUILD_TYPE)
textViewProviderVersion.text = getString(R.string.provider_version_text, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE, BuildConfig.BUILD_TYPE)
textViewProviderVersion.text = getString(R.string.provider_version_text, com.raygun.raygun4android.BuildConfig.VERSION_NAME, com.raygun.raygun4android.BuildConfig.VERSION_CODE, com.raygun.raygun4android.BuildConfig.BUILD_TYPE)

RaygunClient.clearBreadcrumbs()

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}
dependencies {
classpath 'io.github.http-builder-ng:http-builder-ng-core:1.0.3'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
8 changes: 7 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ VERSION_NAME=4.1-SNAPSHOT
# Examples:
#
# 4.0.0-alpha1 -> 40000031
# 4.1.0-alpha1 -> 40100031
# 4.1.0-alpha2 -> 40100032
# 5.2.3 -> 50203000
# 5.3.3-beta2 -> 50303072
VERSION_CODE=40100031
VERSION_CODE=40100032

GROUP=com.raygun

Expand All @@ -56,5 +58,9 @@ POM_DEVELOPER_1_ID=TheRealAgentK
POM_DEVELOPER_1_NAME=Kai Koenig
POM_DEVELOPER_2_ID=mduncan26
POM_DEVELOPER_2_NAME=Mitchell Duncan

android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
9 changes: 3 additions & 6 deletions provider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 34
versionCode = Long.valueOf(VERSION_CODE)
versionName = VERSION_NAME
buildConfigField("long", "VERSION_CODE", VERSION_CODE)
buildConfigField("String","VERSION_NAME","\"${VERSION_NAME}\"")
}

buildTypes {
debug {
debuggable true
minifyEnabled false
buildConfigField("long", "VERSION_CODE", "${defaultConfig.versionCode}")
buildConfigField("String","VERSION_NAME","\"${defaultConfig.versionName}\"")

}
release {
debuggable false
minifyEnabled false
buildConfigField("long", "VERSION_CODE", "${defaultConfig.versionCode}")
buildConfigField("String","VERSION_NAME","\"${defaultConfig.versionName}\"")
consumerProguardFiles 'proguard-rules.pro'
}
}
Expand Down

0 comments on commit 3084271

Please sign in to comment.