User Tools

Site Tools


java:build-java

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
java:build-java [2017/09/09 09:00] – [Basic Changes In Gradle Config] adminjava:build-java [2022/10/29 16:15] – external edit 127.0.0.1
Line 34: Line 34:
 java -jar build\jar\helloworld.jar java -jar build\jar\helloworld.jar
 </code> </code>
 +
 ==== compile and run with external libraries(log4j) ==== ==== compile and run with external libraries(log4j) ====
   * update code to use log4j2<code java>   * update code to use log4j2<code java>
Line 266: Line 267:
 cd simplemaven cd simplemaven
 mvn compile mvn compile
-</code>+</code> => maven will download all **dependency packages** to **~/.m2**
   - Step4: Run<code bat>   - Step4: Run<code bat>
 java -cp target\simplemaven-1.0-SNAPSHOT.jar com.mycompany.App java -cp target\simplemaven-1.0-SNAPSHOT.jar com.mycompany.App
Line 547: Line 548:
   - Step3: Click Install **Buildship Gradle Integration 2.0** or Install **Gradle IDE Pack**   - Step3: Click Install **Buildship Gradle Integration 2.0** or Install **Gradle IDE Pack**
 ==== Add Depedency Package ==== ==== Add Depedency Package ====
 +refer: https://docs.gradle.org/3.3/userguide/dependency_management.html
   - Step1: Goto pages below to search maven packages:    - Step1: Goto pages below to search maven packages: 
     * http://search.maven.org/     * http://search.maven.org/
Line 567: Line 569:
     }     }
 } }
-</code> 
-==== Basic Changes In Gradle Config ==== 
-  * Edit Android SDK Location in **local.properties**<code> 
-# Location of the android SDK 
-sdk.dir=d:/tools/Android/sdk/ 
-</code> 
-  * Edit Build Tools for Android in **android/build.gradle**<code> 
-android { 
-    buildToolsVersion "25.0.0" 
-    compileSdkVersion 25 
-..................     
-</code> If Sdk build tools not exist => gradle will auto install them<code> 
-License for package Android SDK Build-Tools 25 accepted. 
-Preparing "Install Android SDK Build-Tools 25 (revision: 25.0.0)". 
 </code> </code>
  
Line 597: Line 585:
 ==== Add required project ==== ==== Add required project ====
 {{:java:eclipse-project-depedency.png|}} {{:java:eclipse-project-depedency.png|}}
 +===== Proguard =====
 +refer: https://www.guardsquare.com/en/proguard
java/build-java.txt · Last modified: 2024/04/19 03:24 by admin