-
-
Notifications
You must be signed in to change notification settings - Fork 34
Version 2.0.0 #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cketti
wants to merge
37
commits into
dev
Choose a base branch
from
version_2
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Version 2.0.0 #39
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
94f4412
Rename library module to ckChangeLog-core
cketti 1c3e60e
Extract dialog code to separate module
cketti 8f6183d
Make ReleaseItem a top-level class
cketti 2af8329
Clean up the code a bit
cketti 507d9d2
Remove white spaces and line breaks from changes text.
johnjohndoe 0169c57
Re-use newInstance constuctor.
johnjohndoe 6cd83f6
Extract method to clean text of change item
cketti 111ee98
Merge pull request #37 into version_2
cketti f97ba78
Merge pull request #38 from johnjohndoe/new-instance
cketti cd8d027
Update build tools etc.
cketti 0f42533
Extract core functionality into multiple classes
cketti 33da70d
Add tests
cketti 5ff4e47
Make API to get change log nicer
cketti faab3ed
Make XmlParser more strict
cketti 726a00a
Extract library version to variable
cketti 26d7801
Move POM metadata to root project's build.gradle
cketti 14e3cfa
Dynamically write string resource with library version
cketti 82a42ba
Update copyright notices
cketti 2637881
Move change log from README to separate file
cketti 94eb31c
Extract code to generate the change log HTML to separate class
cketti 3b4f673
Expose the used ChangeLog instance to users of DialogChangeLog
cketti 5cae803
Clean up and add more JavaDoc
cketti ee69936
Update Change Log with migration instructions
cketti 1752fac
Update README
cketti e6d9ee8
Add Maven Central snapshot repository
cketti 5e61cbd
Make XmlParser return an unmodifiable list
cketti 30dcb54
Update build tools
cketti 0b40bcf
Update test dependencies
cketti 2af0af4
Change package name to de.cketti.changelog
cketti 445a0ae
Update dependencies
cketti 36c48f8
Clean up code to remove some warnings
cketti c0db1c4
Move change log files from res/xml/ to res/raw/
cketti 89238f7
Add "date" attribute
cketti ce3de32
Rename ckChangeLog-dialog to ckChangeLog-legacy-dialog
cketti 7c9f838
Make writeCurrentVersion() update internal state
cketti c4ff306
Update copyright headers
cketti d483d5d
Update README and CHANGELOG
cketti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,15 @@ | ||
| language: android | ||
| android: | ||
| components: | ||
| - build-tools-21.1.2 | ||
| - android-21 | ||
| components: | ||
| - build-tools-27.0.3 | ||
| - android-27 | ||
| - extra-android-m2repository | ||
| licenses: | ||
| - 'android-sdk-license-.+' | ||
|
|
||
| jdk: oraclejdk8 | ||
|
|
||
| jdk: oraclejdk7 | ||
| before_install: | ||
| - yes | sdkmanager "platforms;android-27" | ||
|
|
||
| script: ./gradlew build | ||
| script: ./gradlew assembleDebug testDebugUnitTest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| ## Change Log | ||
|
|
||
| ### Version 2.0.0 (unreleased) | ||
| **Breaking change!** Change log files are now located in `raw` resource directories rather than the `xml` ones | ||
| (see issue #48). | ||
|
|
||
| The library was split into a core library (`ckchangelog-core`) and a library for the UI part | ||
| (`ckchangelog-legacy-dialog`). | ||
|
|
||
| The core library provides the base functionality like parsing the XML file and remembering the version code of the last | ||
| app version. This allows users of the core library to provide their own visualization of the change log. | ||
|
|
||
| The `ckchangelog-legacy-dialog` library provides the simple dialog from ckChangeLog 1.x that renders the change log in a | ||
| `WebView` inside an `AlertDialog`. However, users are strongly encouraged to write their own UI to display the change | ||
| log. It is the author's belief that `ckchangelog-legacy-dialog` should be avoided because of the following issues: | ||
| * Displaying a dialog on app startup is quite obtrusive. | ||
| * WebView is a very resource-intensive UI widget. | ||
| * Creating a ChangeLog instance triggers a read from `SharedPreferences` and a query to `PackageManager`. Both | ||
| operations that should be performed in a background thread, but aren't if you're using `ckchangelog-legacy-dialog`. | ||
| Similarly, reading the change log resources are operations that should be performed in the background. | ||
|
|
||
| Support for a `date` attribute on the `release` element has been added to `ckchangelog-core`. It's an optional attribute | ||
| that accepts arbitrary strings. It's up the user of the library whether to parse the string as a date in a certain | ||
| format, output the string as-is, or ignore the value. | ||
|
|
||
| Example: | ||
| ```xml | ||
| <release version="1.0" versioncode="1" date="2018-04-01"> | ||
| <change>First release</change> | ||
| </release> | ||
| ``` | ||
| **Note:** `ckchangelog-legacy-dialog` does not support this new attribute. | ||
|
|
||
| #### Update from ckChangeLog 1.x | ||
|
|
||
| 1. Replace the old entry in the dependency block with this: | ||
|
|
||
| ```groovy | ||
| dependencies { | ||
| compile 'de.cketti.library.changelog:ckchangelog-legacy-dialog:2.0.0' | ||
| } | ||
| ``` | ||
|
|
||
| 2. Move the change log files from `res/xml/` and `res/xml-*` to `res/raw/` and `res/raw-*` respectively. | ||
|
|
||
| 3. Then replace the old ckChangeLog code in your Activity's `onCreate()` method with this: | ||
|
|
||
| ```java | ||
| DialogChangeLog changeLog = DialogChangeLog.newInstance(this); | ||
| if (changeLog.isFirstRun()) { | ||
| changeLog.getLogDialog().show(); | ||
| } | ||
| ``` | ||
|
|
||
| Advanced functionality like getting the last version code is available via the `ChangeLog` instance that can be | ||
| retrieved by using `DialogChangeLog#getChangeLog()`. | ||
| Example: `dialogChangeLog.getChangeLog().isFirstRunEver()` | ||
|
|
||
|
|
||
| ### Version 1.2.2 (2015-01-09) | ||
| * Added Ukrainian translation | ||
|
|
||
| ### Version 1.2.1 | ||
| * Added support for [AboutLibraries](https://github.com/mikepenz/AboutLibraries) | ||
| * Fixed build scripts so Javadoc JAR is properly created | ||
|
|
||
| ### Version 1.2.0 | ||
| * Made constant `DEFAULT_CSS` public | ||
| * Changed internals to make it easier to read the change log from different sources | ||
| * Added public method `getChangeLog(boolean)` that returns a list of `ReleaseItem`s | ||
| * Changed minSdkVersion to 4 | ||
| * Switched to Gradle as build system | ||
| * Added Greek, Spanish, Polish, and Russian translation | ||
|
|
||
| ### Version 1.1.0 | ||
| * Added method `skipLogDialog()` | ||
| * Added Slovak and German translation | ||
|
|
||
| ### Version 1.0.0 | ||
| * **Breaking change!** Moved master translation from `res/raw/changelog.xml` to `res/xml/changelog_master.xml` | ||
| * Added German translation of the sample app | ||
|
|
||
| ### Version 0.1 | ||
| * Initial release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| Copyright (C) 2012-2018 cketti and contributors | ||
| https://github.com/cketti/ckChangeLog/graphs/contributors | ||
|
|
||
| Portions Copyright (C) 2012 Martin van Zuilekom (http://martin.cubeactive.com) | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
|
|
||
|
|
||
| Based on android-change-log: | ||
|
|
||
| Copyright (C) 2011, Karsten Priegnitz | ||
|
|
||
| Permission to use, copy, modify, and distribute this piece of software | ||
| for any purpose with or without fee is hereby granted, provided that | ||
| the above copyright notice and this permission notice appear in the | ||
| source code of all copies. | ||
|
|
||
| It would be appreciated if you mention the author in your change log, | ||
| contributors list or the like. | ||
|
|
||
| http://code.google.com/p/android-change-log/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,41 @@ | ||
| buildscript { | ||
| repositories { | ||
| mavenCentral() | ||
| google() | ||
| jcenter() | ||
| } | ||
|
|
||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:1.0.0' | ||
| classpath 'com.android.tools.build:gradle:3.0.1' | ||
| } | ||
| } | ||
|
|
||
| allprojects { | ||
| repositories { | ||
| google() | ||
| mavenCentral() | ||
| } | ||
| } | ||
|
|
||
| ext { | ||
| propBuildToolsVersion = "21.1.2" | ||
| propCompileSdkVersion = 21 | ||
| propBuildToolsVersion = "27.0.3" | ||
| propCompileSdkVersion = 27 | ||
| libraryVersion = "2.0.0-SNAPSHOT" | ||
|
|
||
| pom = [ | ||
| group: "de.cketti.library.changelog", | ||
| name: "ckChangeLog Library", | ||
| description: "An Android Library to display a Change Log", | ||
| url: "https://github.com/cketti/ckChangeLog", | ||
|
|
||
| scmUrl: "https://github.com/cketti/ckChangeLog", | ||
| scmConnection: "scm:git@github.com:cketti/ckChangeLog.git", | ||
| scmDevConnection: "scm:git@github.com:cketti/ckChangeLog.git", | ||
|
|
||
| licenseName: "The Apache Software License, Version 2.0", | ||
| licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0.txt", | ||
| licenseDist: "repo", | ||
|
|
||
| developerId: "cketti", | ||
| developerName: "cketti" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| apply plugin: 'com.android.library' | ||
|
|
||
| android { | ||
| compileSdkVersion propCompileSdkVersion | ||
| buildToolsVersion propBuildToolsVersion | ||
|
|
||
| defaultConfig { | ||
| versionName libraryVersion | ||
| minSdkVersion 14 | ||
|
|
||
| resValue "string", "library_ckChangeLog_libraryVersion", libraryVersion | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation 'com.android.support:support-annotations:27.1.1' | ||
|
|
||
| testImplementation 'org.robolectric:robolectric:3.7.1' | ||
| testImplementation 'junit:junit:4.12' | ||
| testImplementation 'org.mockito:mockito-core:2.18.0' | ||
| } | ||
|
|
||
| project.ext.pom = rootProject.pom | ||
| project.ext.pom['artifactId'] = "ckchangelog-core" | ||
|
|
||
| apply from: '../android-mvn-push.gradle' | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <manifest package="de.cketti.changelog"> | ||
|
|
||
| <application/> | ||
|
|
||
| </manifest> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.