Skip to content

Commit

Permalink
Merge pull request #7 from Digidemic/feature/jitpack
Browse files Browse the repository at this point in the history
- Added JitPack integration to distribute build aar, javadoc, and sources: https://jitpack.io/#digidemic/unitof
  - UnitOf can then be installed within your project's build.gradle.
  • Loading branch information
Digidemic authored May 25, 2024
2 parents 7613027 + f5f02ce commit 21e0239
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 5 deletions.
44 changes: 39 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,31 @@ var h = x.convertNow("3", "FEET", "METERS"); //0.9144 returned as 3 feet is 0.91
## Installation
>Clone the UnitOf repo to your local machine using `https://github.com/digidemic/UnitOf`<br>Only the single compiled UnitOf file of its language needs to be imported and referenced.

### Java

#### JitPack / build.gradle
[![](https://jitpack.io/v/Digidemic/unitof.svg)](https://jitpack.io/#Digidemic/unitof)
1) Add JitPack to your project's root `build.gradle` at the end of `repositories`:
- ```groovy
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
```
2) In the `build.gradle` of the module(s) you wish to use UnitOf with, add the following to `dependencies`:
- ```groovy
dependencies {
implementation 'com.github.digidemic:unitof:1.0.1'
}
```
3) [Sync gradle](https://www.delasign.com/blog/how-to-sync-an-android-project-with-its-gradle-files-in-android-studio/) successfully.
4) Done! Your project is now ready to use UnitOf. Go to [Examples](#examples) or [the UnitOf website](https://digidemic.github.io/UnitOf/) for UnitOf usage!

#### By Importing Jar

>1) Import `/UnitOf.jar` from the cloned repo into your project.
>2) In your classes using UnitOf, add `import com.digidemic.unitof.UnitOf;` to your list of imports.
- ##### Import using Netbeans IDE 8.2
Expand Down Expand Up @@ -118,9 +141,20 @@ Install-Package UnitOf -Version 1.0.0
- `JavaScript` - UnitOf_v1.2.3.0b
- `C#` - UnitOf_v1.2.3.2a

## Author
## License
UnitOf website, logo, Palindrome Conversion Algorithm, and all source code & example projects for Java, JavaScript & C# created by Adam Steinberg of DIGIDEMIC, LLC
```
Copyright 2024 DIGIDEMIC, LLC
## License
- UnitOf licensed under **[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)**
- Copyright 2018 © <a href="https://digidemic.io/">DIGIDEMIC, LLC</a>.
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.
```
3 changes: 3 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
install:
- FILE="-Dfile=UnitOf.jar"
- mvn install:install-file $FILE -DgroupId=com.github.digidemic -DartifactId=unitof -Dversion=1.0.1 -Dpackaging=jar -DgeneratePom=true
29 changes: 29 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.unitof</groupId>
<artifactId>unitof</artifactId>
<version>1.0.1</version>
<packaging>pom</packaging>
<description>A measurement and data type conversion library for Java, JavaScript and C#</description>
<url>https://github.com/Digidemic/unitof</url>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<id>Digidemic</id>
<name>Adam Steinberg</name>
<email>digidemic@gmail.com</email>
</developer>
</developers>
<scm>
<connection>scm:git://github.com/Digidemic/unitof.git</connection>
<developerConnection>scm:git://github.com/Digidemic/unitof.git</developerConnection>
<url>git://github.com/Digidemic/unitof.git</url>
</scm>
</project>

0 comments on commit 21e0239

Please sign in to comment.