mirror of
https://github.com/tribufu/tribufu-java
synced 2026-05-06 06:47:27 +00:00
Add example app
This commit is contained in:
parent
e16191f023
commit
46eec14060
3 changed files with 39 additions and 0 deletions
24
example/build.gradle
Normal file
24
example/build.gradle
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
plugins {
|
||||
id "application"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = "https://mvn.tribufu.com/releases" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "com.google.guava:guava:30.0-jre"
|
||||
implementation project(":")
|
||||
testImplementation "junit:junit:4.13.1"
|
||||
}
|
||||
|
||||
jar {
|
||||
dependsOn ":jar"
|
||||
from project(":").sourceSets.main.output
|
||||
from configurations.compileClasspath.filter { it.name.contains("com.tribufu") }.collect { zipTree(it) }
|
||||
|
||||
manifest {
|
||||
attributes("Implementation-Title": rootProject.name, "Implementation-Version": project.version, "Main-Class": "com.tribufu.example.Main")
|
||||
}
|
||||
}
|
||||
13
example/src/main/java/com/tribufu/example/Main.java
Normal file
13
example/src/main/java/com/tribufu/example/Main.java
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package com.tribufu.example;
|
||||
|
||||
import com.tribufu.TribufuApi;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
String userAgent = TribufuApi.getUserAgent();
|
||||
System.out.println(userAgent);
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +1,3 @@
|
|||
rootProject.name = "tribufu"
|
||||
|
||||
include("example")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue